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

Question

Question

Update Query data from a multiple value field in Workflow

asked on April 3, 2013 Show version history

Hi Team,


I was wondering if you are able to please help. I have a multiple value field in our Template. I would like to capture each of these values and write them into our MySQL database using Workflow. Currently I can only get the first field to write. I am guessing there could be something in the Token dialog that you may be able to apply a function or index but I am not sure how to do this?

Here is my example to help explain:

See the 2 values below that have 2 Creditor Invoice Numbers (2333170 and 2331430).


We would like to write this data into our database and have it to look like this:2333170 2331430. Basically add a space between each value (or even a comma will do).

While I think of it: you wouldn't have a Pattern Matching cheat sheet with a full list of examples? It would be really handy.

0 0

Answer

APPROVED ANSWER
replied on June 25, 2013

Hey Grant,

 

There are a couple of different ways to do this with a multi-value field, so I’ll show you my preferred method. I made a document with a multi value PO field and I have workflow retrieve those values and create a token called ‘database values.’  For each of those values in the PO field, I add it to the ‘database values’ token. This is the part I think you were having trouble with and the key is to modify the token with a Token Value of ‘%(database values) %(ForEachValue_Current Value).’  This will add a PO number to the token, iterate through the next PO number and tack it on to the end of the token, instead of erasing the previous value and replacing it. 

 

 

This turns values in a multi value field

Into this:

Which you would then be able to insert into a table.

 

As for your second question, check out this paper:Pattern Matching and Token Formatting.

0 0

Replies

replied on August 19, 2013

You could just format the multi-valuefield token as a space delimited list when you use it in the Insert Data activity without having to create a separate token for it: %(RetrieveFieldValues_PO NUmber_ALL#[ ]#)

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

Sign in to reply to this post.