I am testing a workflow that uses the magnifying glass "search repository". The purpose of the search is to iterate over a group of users, then give provide the result count for each user. Trouble is, I can't get the token dialog syntax correct in designer when I am testing it. I would guess it would be "smithj, jonesd, simpsonh", but that's not working; I get 0 results. I can test it out by actually running the workflow, but that's not efficient.
Question
Question
Syntax for "define token values" dialog when testing multi-value tokens?
Answer
Your token definition should be just the values.
Where you use it, it looks like you're trying to feed the values as a comma-delimited list? So that would be %(_users_repository#[, ]#)
Then when you try to test it, you want to supply the comma-delimited value as the "final value".
When workflow runs, the back-end will take your multi-value token and apply formatting to it before feeding it to the Search Repo activity. But when testing through the UI, you are expected to do that yourself.
Replies
When testing activities, this dialog expects the "final" value of the token and it will not apply formatting on its own. Semi-colon delimited values can be specified for multi-value tokens.
However, in your screenshot, the expected value is not a multi-value token, it looks to be expected a list of values with no spaces between them? You'd want to use a delimiter in your token formatting (so it should be something like #[,]# or #[ ]# for a comma or space delimited list).
Thanks, Miruna, this is helping. First, the way I have written my multi-value tokens is #[]#, which means it's not expecting a space. What's in between the square brackets is a delimiter, I see that. I didn't know that meant anything. I'll probably end up going with #[,]#. So now I am unclear on how to create my token of values.
Here is where the values are entered, and how I originally did it.
If I use a comma, should it be like this? Commas, no spaces, all entered on one line?
Or is it like this?
Would I need token tags with these?
Your token definition should be just the values.
Where you use it, it looks like you're trying to feed the values as a comma-delimited list? So that would be %(_users_repository#[, ]#)
Then when you try to test it, you want to supply the comma-delimited value as the "final value".
When workflow runs, the back-end will take your multi-value token and apply formatting to it before feeding it to the Search Repo activity. But when testing through the UI, you are expected to do that yourself.