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

Question

Question

Mutil Value Field extract into a Multi Token

asked on August 27, 2023

Hi all, 

 

I'm stuck with Workflow, trying to get the multi field out of the meta into a multi token field. Its for a receipt form, which can have multiple students on one form.

 

In this scenario, the form takes multiple student names from a table and puts them into a student name field when saving to the repository. I then run a workflow to go through the folder, however I am stuck on how I can get all the student names out into a multi token.

 

Perhaps I am approaching this the wrong way. Any help appreciated.

0 0

Answer

SELECTED ANSWER
replied on August 28, 2023

You shouldn't need a second token at all unless there's something else you want to do with the values. When you select a multi-value field for Retrieve Field Values it has options for retrieving all values as a multi-value token or selecting by index.

If you have it set to "All Values" then it should already be pulling it as a multi-value token so you can work with that token directly.

If you still want to copy those values to a secondary token, all you should have to do is set the token equal to the output of the Retrieve Field Values activity. Just make sure you have it set to retrieve all values and the new token is multi-value.

1 0

Replies

replied on August 28, 2023

Thank you very much Jason, for the clear explanation and also showing how to extract it via the token, that is very helpful. 

 

In regards to not needing an extra token to manipulate it, I wonder if I am doing it the long way. Basically I am reading all the meta fields from receipts in a folder and want to pass it on to an End of Day tally of all the receipts by invoking another form I create. 

When I invoke the form, I set the starting variables of the table displaying all the receipts via a token that has gone through the "For Each Entry"  that captures each documents meta, e.g Student Name for the receipt. 

It seems to work, but I am curious to know how you as a more seasoned LF user would approach this.

Thanks again for the help!

 

0 0
replied on August 28, 2023

It doesn't sound like there's anything wrong with that approach. Sometimes I'll do that, other times I'll push the data to a SQL database and only push a reference id to use lookups, but that's usually for more complex processes.

However, if you're doing a "cumulative" list, which I didn't notice the first time, then you want to create your multivalue token before the loop

If you create it in the loop, you'll only have the data from the last document because it'll basically wipe it out with each iteration.

Instead, since it looks like you want more of a running tally, you'd create the multivalue tokens before the loop. Then, you only update those tokens using the append option when you're inside of the loop so it maintains the data from the previous loop iterations.

You also don't need to have the multiple Assign Token activities inside/outside the loop, you should have one before the loop to create all your empty tokens at once, then one inside that updates them all at once.

2 0
replied on August 28, 2023

Thanks for the insight Jason, very much appreciated. I was on the right path with the create and append tokens, however I was creating multiple token activities unnecessarily, it makes more sense now that I have a better understanding.

 

Thanks for taking the time to share your knowledge, appreciate it!

 

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

Sign in to reply to this post.