How to parse vars variables to the Segment Code? | Community
Skip to main content
Level 3
Oct 23, 2018 8:27 AM UTC
Solved

How to parse vars variables to the Segment Code?

I will take below workflow as an example, the first query activity has a js code in initialization script: vars.version1=1.1

2. The second split activity trying to get the variables set in the query activity. Use the expression like below: $(vars/@version1)

3. There a below error when I run the workflow:

XTK-170036 Unable to parse expression "'1.1'".

The expression looks like get the value of the variable version1, but it can not set to the Segment code. Is there any problem with the expressions? If yes, please let me know how to correct it? Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
sagi_laniadoAccepted solution
Level 3
Oct 23, 2018 3:34 PM UTC

Hi,
Try injecting it to the xml using the initialization script inside the split activity

activity.transitions.extractOutput[0].code = vars.version1

Cheers,
Sagi

2 replies

Level 3
Oct 24, 2018 9:11 AM UTC

Thank you! That is working

Translate
sagi_laniadoAccepted solution
Level 3
Oct 23, 2018 3:34 PM UTC

Hi,
Try injecting it to the xml using the initialization script inside the split activity

activity.transitions.extractOutput[0].code = vars.version1

Cheers,
Sagi

Translate