Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to parse vars variables to the Segment Code?

Avatar

Avatar
Give Back
Level 2
felixsongfei
Level 2

Likes

11 likes

Total Posts

32 posts

Correct Reply

2 solutions
Top badges earned
Give Back
Ignite 3
Ignite 1
Validate 10
Validate 1
View profile

Avatar
Give Back
Level 2
felixsongfei
Level 2

Likes

11 likes

Total Posts

32 posts

Correct Reply

2 solutions
Top badges earned
Give Back
Ignite 3
Ignite 1
Validate 10
Validate 1
View profile
felixsongfei
Level 2

23-10-2018

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

1603080_pastedImage_1.png1603081_pastedImage_2.png

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

1603084_pastedImage_5.png

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!

1603083_pastedImage_4.png

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 2
sagil23995776
Level 2

Likes

17 likes

Total Posts

32 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
sagil23995776
Level 2

Likes

17 likes

Total Posts

32 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
sagil23995776
Level 2

23-10-2018

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

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

1603375_pastedImage_0.png

Cheers,
Sagi

Answers (1)

Answers (1)

Avatar

Avatar
Give Back
Level 2
felixsongfei
Level 2

Likes

11 likes

Total Posts

32 posts

Correct Reply

2 solutions
Top badges earned
Give Back
Ignite 3
Ignite 1
Validate 10
Validate 1
View profile

Avatar
Give Back
Level 2
felixsongfei
Level 2

Likes

11 likes

Total Posts

32 posts

Correct Reply

2 solutions
Top badges earned
Give Back
Ignite 3
Ignite 1
Validate 10
Validate 1
View profile
felixsongfei
Level 2

24-10-2018

Thank you! That is working