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

Question

Question

For Each Entry + Multi-Valued Token

asked on December 8, 2016 Show version history

My goal is to copy a document from one folder in Laserfiche to another, switch the volume & template, and copy two or three fields of metadata, one of which is a multi-valued token called "Billing_AcctNo".

I experience no issues when the multi-valued token is "single-valued", but when two or more values exist in the "Billing_AcctNo" field, none of the values are copied over, though the documents are copied to the correct folder with the correct volume & template. I suspect an error in the set-up of multi-valued field value retrieval. Each document could have a different number of indices in the multi-valued field. Do I need to determine this for each document, and loop through using the index numbers?

Any help would be much appreciated!

WorkflowDiagram.JPG
RetrieveFieldValues.JPG
0 0

Replies

replied on December 8, 2016 Show version history

Hi Maggie - 

The way I read your goal, it sounds to me like you would want to take a different approach here. Instead of the Create Entry and Move Pages activities, I would use a Move Entry activity with the Action set to Copy. For the multi-value field, make sure your Retrieve Field Values activity is set to retrieve All Values:

 and that your Assign Field Values activity is set to Append to Existing Values:

Also, use the Assign Field Values activity to assign the new template for the copied document and add a Migrate Entry activity to change the volume. 

1 0
replied on December 8, 2016

If the value is a multivalue token you will want to iterate over all its values to copy them. 

replied on December 8, 2016

Will a For Each Value loop not accomplish this? What is the trick to making this happen?

0 0
replied on December 8, 2016

I'm not sure why you are creating a new entry for each value, But it looks like you will want to add a conditional to check if the value is a multivalue, then iterate over the multivalue using a for each value loop

You are not allowed to follow up in this post.

Sign in to reply to this post.