How to parse vars variables to the Segment Code? | Community
Skip to main content
Level 3
October 23, 2018
Solved

How to parse vars variables to the Segment Code?

  • October 23, 2018
  • 2 replies
  • 4937 views

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.
Best answer by sagi_laniado

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

sagi_laniadoAccepted solution
Level 3
October 23, 2018

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

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

Cheers,
Sagi

Level 3
October 24, 2018

Thank you! That is working