Can use JavaScript to set an expiration date for list updates? | Community
Skip to main content
Level 2
February 11, 2021
Solved

Can use JavaScript to set an expiration date for list updates?

  • February 11, 2021
  • 4 replies
  • 4160 views

Hello.

 

Can use JavaScript to set an expiration date for list update activity?

 

I want to set when updating the workflow list without using Explorer.

 

Thank you.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by DebTr

Hi,

You can use the update data activity after the list creation to set the expiry date.

In case you want to have a computed label for your List,

1.you can store it in a instance variable first

2. set the label using instance variable.

3. set expiry date using a update data activity as per the following.

 

Thanks,

Deb

4 replies

DavidKangni
Community Advisor
Community Advisor
February 12, 2021

Yes You can set this up. Just create a workflow that read list table and select list without expiration date and update them with a data update activity.

Thanks,

David

David Kangni
uz2020Author
Level 2
February 16, 2021

@davidkangniThank you for your reply. Does that mean selecting "Delete" for "Record identification"? I want to delete unnecessary lists after the scheduled time. Thank you.

DebTrAccepted solution
Level 6
February 25, 2021

Hi,

You can use the update data activity after the list creation to set the expiry date.

In case you want to have a computed label for your List,

1.you can store it in a instance variable first

2. set the label using instance variable.

3. set expiry date using a update data activity as per the following.

 

Thanks,

Deb

uz2020Author
Level 2
March 3, 2021
@debtr Thank you for your reply! I was able to set the expiration date. Thank you!
Level 2
March 23, 2023

@debtr @uz2020 I think I'm close but running into an issue. I have (1) query activity to pull some test recipients (2) List Update activity where I am defining an instance variable in the Advanced tab and then using that instance variable to define the Label in the List Update tab and (3) Update data activity to try to set the expiration date (this is where I'm getting an error). Screenshots below. Do you have any ideas on why this is failing? I tried checking the 'Create or use a list with its own table' in the 'List update' tab also, but it made no difference. Thank you in advance!

 

 

 

 

Log file from 'List Update' activity shows the computedLabel variable appears correctly.

 

'Update data' activity configuration (including logInfo in Advanced tab to confirm instance variable is seen in this activity also)

 

Error shown in Journal for the 'Update data' activity

 

 

 

 

 

 

Level 6
April 19, 2023

Can you try using nms:group instead of what you are using in "updated dimension" and run the workflow?

Thanks,

Deb

Level 2
April 27, 2023

Hi Deb, I selected what you have above and when it populates it in the Updated dimension it's the same as what you have above ("List of recipients"). Same error. Thanks, Cindy