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

Question

Question

Workflow only processes first value in multi-value field

asked on June 22, 2016 Show version history

I have a workflow that is used to create folders based on it's contents (multi-val folders image.)  What it does is creates a folder only for the first value in the multi-value field and never gets to the other values.  I've tried putting a 'For Every Value' flow control in and it recognizes the multiple occurrences, but for every occurrence it processes the first value in the multi-value field over again. (mult-val loc image - Loc = SHP and SPG)

How do I get Workflow to process all the values in the multi-value field?

Note:  that there should be a Feed folder under SPG containing same document as what is in the SHP feed folder but this doesn't exist.

6-22-16 mult-val folders.png
6-22-16 mult-val loc.png
0 0

Answer

SELECTED ANSWER
replied on June 22, 2016 Show version history

To expand on what I posted earlier, if your activity inside the for each value was to email someone (say your multivalue field is filled with email addresses), this is how you would email each one separately:

 

 

When you choose your token with the > symbol, under the "for each value" is the current value. 

 

This is sort of like in programming where you might say "for each X, do something[X]". The current value references whatever it's pointing at in the list.

 

The other for each loops work the exact way - the "For each Entry" works off searches of laserfiche entries, "For each row" off a database query, etc.

 

 

1 0

Replies

replied on June 22, 2016 Show version history

You need to use a "for each value". 

When you choose the token you are looping through, you will notice it says _all after it. 

 

Whatever you want to do for each value, put inside the loop. 

 

0 0
replied on June 22, 2016 Show version history

Morning Chris,

I have the loop setup that way but still only get the first value in the multi-value field when creating the folders.  See attached.

6-22-16 WF loop.PNG
0 0
replied on June 22, 2016

Are you using the Current Value token when naming the folder or are you still using the token from Retrieve Field Values?

0 0
replied on June 22, 2016

Miruna,

Token from Retrieve Field Values.  What did I miss in my process?

Michelle

0 0
replied on June 22, 2016

You want to use the current value token from For Each Value. Otherwise, you'd always get the first value (because when you use a multi-value token in a single value field, like the folder name, Workflow always uses the first value since it can't guess what the user actually wanted).

1 0
replied on June 22, 2016

Oops, forgot to mention that part. That's the most important part! :)

0 0
replied on June 22, 2016

Miruna,  current value token?  How do I create one?  Sorry if that's a basic question, but I am new to Workflows.  Appreciate the help!

0 0
SELECTED ANSWER
replied on June 22, 2016 Show version history

To expand on what I posted earlier, if your activity inside the for each value was to email someone (say your multivalue field is filled with email addresses), this is how you would email each one separately:

 

 

When you choose your token with the > symbol, under the "for each value" is the current value. 

 

This is sort of like in programming where you might say "for each X, do something[X]". The current value references whatever it's pointing at in the list.

 

The other for each loops work the exact way - the "For each Entry" works off searches of laserfiche entries, "For each row" off a database query, etc.

 

 

1 0
replied on June 22, 2016

Looking at your screenshot above yours would look like this:

 

 

You'd build your path and use that token as the location to route. however if you are going to do this make sure you route shortcuts. If you tell it to route the folder it won't do you any good since it'll be in that folder for all of a nanosecond before going to the next folder. :)  

 

Unless it's a wait condition - but if it's a wait condition it won't go to the next loop until someone finishes that one step. If all they need is a shortcut to the document, I've found just using the move function is easier, just select create shortcut in it. 

1 0
replied on June 23, 2016 Show version history

Chris, I was able to setup my path using the current value and that worked, thank you!  Highlighted folders were the ones missing because it wasn't moving to the next value in my Location field.

You mentioned routing shortcuts and I'm not sure I understood what you meant by this.  Can you provide some more detail?

6-23-16 wf export folders work.PNG
0 0
replied on June 23, 2016 Show version history

 

If you were routing the document each time using the "moving it" above, it will move it into each folder path (thereby creating the path). But then when it goes to the next value in the list it move that entry to that folder. So if here's 4 things in the list the actual document is sitting in item #4. 

If you route a shortcut to the folder it puts a shortcut to the original document there. In cases where I build something like this I usually have a central spot I store these types of documents then put shortcuts pointing to those elsewhere.

 


A real world example of this might be an order process that involves a bill of lading. 

The orders might live inside a folder for all of the orders, or they might live in the customer's folder. A bill of lading however might be assigned to more than one order. 

 

So I might have something like this: 

 

/Orders
   /[year]
       /[## - Month]
 

/Customer
      /Orders
            /[Year]

 

/Shipping
      /Bills of Lading
          /[year]
               /[## - Month]


Obviously I'm missing some folders above but you can get the point.

So when an order comes in, it goes into the Orders folder, under the year and month by the order #. Most of the time this is a folder so it can also hold any paperwork that goes with it.  

Under the customer orders, I place a shortcut folder for each order under the appropriate year pointing at the folder under Orders. 

 

The BoL docs go under the bill of lading folder by year and month, and a shortcut to those go into the order folder. One BoL might have multiple orders on it, or just parts of one order. These shortcuts go to any order # that is on the BoL. These are usually named with a unique BoL number or something. 
 

Now everyone can find everything about a customer order in one place under the customers, but order fulfillment and shipping can find everything in a place that makes it easy for them since they are not as customer centric, they just case about fulfilling whatever is on those orders and BoL's.

0 0
replied on June 23, 2016

BTW  -- as an extra bonus -- why the [## Month] name? I get this by formatting a token like so:

 

You click that little > symbol next to your destination. If you use a token (i.e. field) that is a date as part of your path, you can use the apply format to change the name.

So I use 'yyyy' as the format of the year to make 6/23/2016 into just '2016', and 'MM MMMM' to make 6/23/2016 into '06 June'.

This way the months are in numerical order!   laugh

0 0
replied on June 23, 2016

Chris,  Totally get it.  You were referencing use of the move not the copy, as I'm doing in my example.  Makes sense.  Your real world example is very helpful!  I like the use of the month created from the token.

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

Sign in to reply to this post.