You are viewing limited content. For full access, please sign in.

Question

Question

How to iterate a Token on loop

asked on January 30, 2014

For some reason I can not think of a logical way to do this. Basically I am looking at doing a ++ 

 

0 0

Answer

SELECTED ANSWER
replied on January 30, 2014

For each value automatically will loop through all the values of a multivalue token for you. If you wanted to script it without code to do a loop, create a token with assign token value then use token calculator to +1 to the that token and use assign token value again to update the value, you can use this token to index the multivalue token you're dealing with:

3 0

Replies

replied on January 30, 2014

In a Workflow script or in a Workflow definition? There's a For Each Value activity that you can use to iterate over the token.

0 0
replied on January 30, 2014

Workflow Definition. I know how to do a loop for each but I am unsure how to set an integer counter so that I can record the number

0 0
replied on January 30, 2014

What exactly are you trying to do? If you are just trying to count the values there is a token function that gives you that. Above I showed how to set an integer and increment it.

If I have a little more information on your use-case I can better point you at the proper tool.

0 0
replied on January 30, 2014

I'm sorry, can you explain what you're trying to do? For Each Value doesn't need a counter. Are you trying to figure out how many values are in the multi-value token?

replied on January 30, 2014

I was looking to keep track of loop count  so that after a loop I could add my original number plus loops count

0 0
replied on January 30, 2014

Got it. You'll want to use the process shown above, initiate a token and increment it with token calculator then assign that value back to the original token. (Easier seen in the image)

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.