Variable Wait activity time | Community
Skip to main content
CampaignerForLife
New Participant
March 22, 2023
Solved

Variable Wait activity time

  • March 22, 2023
  • 2 replies
  • 1038 views

Is there any way to do this? Instead of a number (Like, 5s) set it to be a value generated in the workflow

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 ParthaSarathy

Hi @campaignerforlife ,

You can replace wait activity with JavaScript Code Activity, and insert the below script

instance.vars.WaitTime = 5000; task.wait(instance.vars.WaitTime);

 

Or By using Wait Activity > Advanced tab's Initialization script > add the same code, and Define duration as 0s in Wait tab.

 

 

 

 

2 replies

ParthaSarathy
ParthaSarathyAccepted solution
New Participant
March 22, 2023

Hi @campaignerforlife ,

You can replace wait activity with JavaScript Code Activity, and insert the below script

instance.vars.WaitTime = 5000; task.wait(instance.vars.WaitTime);

 

Or By using Wait Activity > Advanced tab's Initialization script > add the same code, and Define duration as 0s in Wait tab.

 

 

 

 

 ~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
_Manoj_Kumar_
New Participant
March 22, 2023

Hello @campaignerforlife 

 

If you have a single wait activity then you can use this code in a javascript activity before the wait activity.

instance.activities.wait[0].delay=TIME_IN_SECONDS;

 

     Manoj     Find me on LinkedIn