Expand my Community achievements bar.

SOLVED

Use and update a variable in each schedule workflow run

Avatar

Level 4

Hi,

I want to use a variable, update it each time my workflow is run on a schedule.

Vapsy​, florentlb​, smacdonald2008​, Jean-Serge Biron​, hillaryc26951904​ kindly provide your feedback.

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi,

if you want to use the variable in 1 workflow only use an instance variable :

instance.vars.myVariable = "blablabla";

you can find more details here : JavaScript scripts and templates https://helpx.adobe.com/campaign/kb/instance-variable-in-workflow.html

on the other hand, if what you are looking for is a variable to use across multiple workflows you have options :

getOption("myOption");

setOption("myOption", "bliblibli");

some examples in here : https://technowide.net/2017/02/28/options-store-configurations-ac/

Kind regards,

Pierre

View solution in original post

1 Reply

Avatar

Correct answer by
Level 5

Hi,

if you want to use the variable in 1 workflow only use an instance variable :

instance.vars.myVariable = "blablabla";

you can find more details here : JavaScript scripts and templates https://helpx.adobe.com/campaign/kb/instance-variable-in-workflow.html

on the other hand, if what you are looking for is a variable to use across multiple workflows you have options :

getOption("myOption");

setOption("myOption", "bliblibli");

some examples in here : https://technowide.net/2017/02/28/options-store-configurations-ac/

Kind regards,

Pierre