Setting Global XML Workflow Variables | Community
Skip to main content
davidl14970702
Level 4
April 23, 2019
Solved

Setting Global XML Workflow Variables

  • April 23, 2019
  • 1 reply
  • 2406 views

I have a bunch of workflows within a campaign that needs the date changed every time. I would run DaysAgo() but this person needs to be able to also search any customer date range.

I know I can use a JS activity to set the dates and call it into the activity like this.

vars.myDateOnOrAfter = "2019-04-04T12:00:00Z";

vars.myDateOnOrBefore = "2019-04-14T12:00:00Z";

Can anyone confirm the correct syntax to set these dates in the properties of Campaign in the XML?

I tried this and it didn't see my variables.

<variables vars.myDateOnOrAfter="2019-04-04T12:00:00Z" vars.myDateOnOrBefore="2019-04-14T12:00:00Z"/>

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 Jonathon_wodnicki

Hi,

Use NL.XTK.formatDateTime() to set a new datetime attribute in the workflow schema, for whatever you're tracking.

If the number of workflows is limited, e.g. ETL workflows, consider using xtk:option's instead.

Thanks,

-Jon

1 reply

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
April 23, 2019

Hi,

Use NL.XTK.formatDateTime() to set a new datetime attribute in the workflow schema, for whatever you're tracking.

If the number of workflows is limited, e.g. ETL workflows, consider using xtk:option's instead.

Thanks,

-Jon