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

Question

Question

Using the Retrieve Field Values atoken option of a multifield to rou

asked on November 7, 2016 Show version history

Hi, 

 

I'm working on a workflow that will look at a field called 'Last Name, First Name' which is a multifield. This field's intended use is to hold up to a maximum of 3 names, or a minimum of 1. Each name gets it's own folder created by the workflow when moved to the record series. It moves the document first, and then should copy the document to the other 2 named folders. When there's 3 names entered, the workflow works as designed. If there's only 1 name entered the workflow should disregard the second and third positions of the multifield since there is no data in them, and complete the workflow by only creating the 1 folder for that name. But it does not do that. Instead it will create 3 copies of the document in the 1 record folder, and 3 shortcuts in the transparent records management folder. I tried using the routing decision activity and the Conditional Parallel activity but got the same results. In the routing decision version, I route by the 3 separate retrieve field values activities I've created where each one of those looks for either the first, second or third position in the multifield. I use the 'Token Retrieve Field Values Position 2 is not empty' to direct it down the path to the next set of Route Entry to Folder activities. Then on the other branch I use the 'Token Retrieve Field Values for Position 2 is empty' to the End Workflow activity if no position 2 data is there. But it seems not to matter that position 2 is empty because it always goes down the 'is not empty' branch, and creates copies of the document. Is there another way to accomplish this? Or is the token not working to properly route it? Screen shot 083 Workflow shows the whole workflow with the condition. Screenshot 083 Workflow -2 shows the retrieve field values index that it's retrieving. 

 

Thanks in advance, 

 

Brian 

 

083 Workflow.JPG
083 Workflow -2.JPG
Only one name in the multifield was selected for this example.JPG
083 Workflow.JPG (83.13 KB)
0 0

Answer

SELECTED ANSWER
replied on November 8, 2016

That is exactly the reason.

The workflow could be redesigned as follows (I only used on Route to Folder at each step for readability):

1 0

Replies

replied on November 8, 2016

Hi Brian,

From the Admin Guide:
If you are counting values from the start and you specify an index greater than the total number of values in the token, the token will be replaced by the last value. If you are counting values from the end and you specify an index greater than the total number of values in the token, the token will be replaced by the first value.

So if you only have one entry in your multi-value field and look at index 2, you will return the value at the first index.   That is why your routing decisions are always returning true.

You can use the token dialog and apply the function 'Value Count' to get the number of values in your multi-value field and use that in your decision making.

Hope that helps,

Andrew

3 0
SELECTED ANSWER
replied on November 8, 2016

That is exactly the reason.

The workflow could be redesigned as follows (I only used on Route to Folder at each step for readability):

1 0
replied on November 8, 2016

Thanks, Andrew and Miruna. This is genius! I can't thank you both enough! 

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

Sign in to reply to this post.