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

Question

Question

Using a token as part of a variable

asked on September 7, 2023

Hi all, 

Not sure what the correct term is, but I am trying to reference a variable with a token.

 

For example say I have 

Variable1

Variable2

Variable3

How can I reference it with a token like Variable%token%. (I have tried it simply like that but it does not seem to work. Or is this even possible?

 

Thank you

 

0 0

Replies

replied on September 7, 2023

Some more details, or a screenshot of your workflow setup step(s) where you are doing this, would be helpful. I was able to do a retrieve business process variable step and a create token step, then make another token referencing both. So I think you can do it, the syntax you are using may just be wrong. If we had something more detailed to look at we could probably tell you more.

1 0
replied on September 7, 2023

Hi,
I'm new to all this LF stuff, so may not be the proper response...
BUT, if you can't specify a variable, could you not have that variable created as another Token, which you could then reference?

It may change how you have to script the rest of whatever you're doing though.

 

OR

 

You might want to look at multiple values for the token as your variables, and calling those values with something like this.

%(TokenEntry#[2]#) - calling value 2 of the TokenEntry token

0 0
replied on September 7, 2023

Hi Thanks all, 

 

A more in depth post and separate question is below of what I am trying to do, perhaps I am approaching this all wrong. I am fairly new to this space.

https://answers.laserfiche.com/questions/211705/Split-table-or-nested-tables--advice-on-a-solution

So trying to increment a variable using a token(called incrementor) as below, but its giving me an error.

Thanks Stephen, yes I have been using multiple tokens for other aspects but I'm, stuck on this one. Maybe I have been staring at it too long!

Thanks

0 0
replied on September 8, 2023 Show version history

You have %(RetrieveBusinessProcessVariables_student%(Incrementor)_firstname) as your token value. Is that %(Incrementor) in the middle your counter token, and you are trying to make it return something like %(RetrieveBusinessProcessVariables_student3_firstname)? If so, you can't do that.

 

I found this post that gives an example of iterating a multivalue business process variable:

 

https://answers.laserfiche.com/questions/111660/Retrieve-business-process-variables-collection-to-multivalue

Using the token creator myself, here is my example if I want to get all values from a particular table field:

 

 

 

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

Sign in to reply to this post.