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

Question

Question

Workflow - Can I use WF to compare Starting Entry Name and a Field

asked on March 11, 2016

I would like to run WF at the end of each day (after hours, on a timer), look at all the day's newly created documents and compare the name of each one it finds with one of the fields.  If it finds an exact match, then change part of the field.  Is this possible?  I can't find an activity that will do the comparing part (step 4 as shown below)

  1. Search Repository
  2. For Each Entry
  3. Retrieve Field Values
  4. (How do I get it to compare the Field Value and the current document name?)
  5. Assign Field Values
  6. (move on to the next)

 

Thx, Connie Prendergast, Flagstaff County, AB Canada

0 0

Replies

replied on March 11, 2016 Show version history

Sure, you should be able to do that.  Just make step 4 a Routing Decision activity.  The condition in your routing decision would be "Entry: Name - equals - %RetrieveFieldValues_[YourTemplateFieldName]".

 

In the screenshot below, my field name was "ImagePath"

 

 

 

Screenshot.PNG
Screenshot.PNG (11.39 KB)
1 0
replied on March 11, 2016

this was it, this was what I needed.  Thanks!

0 0
replied on March 11, 2016

Hello Connie, 

 

You can use the Conditional Sequence activity to compare the name of the created document to a field. In this case, step 4 would be the Conditional sequence and step 5 would be within the that conditional sequence as shown in the picture below.

The condition within the Conditional Sequence activity will be 

Where Field is the field that you want to compare the name to.

1 0
replied on March 11, 2016

Yep, this was what I needed.  Thanks!

0 0
replied on March 11, 2016

I'm also now trying to figure out how to get it to replace only the ONE field value (this is a multi-value field).  Currently, it is replacing all/any of these field values with just the one corrected value.

Any ideas of what I can do? 

0 0
replied on March 11, 2016

Are you trying to replace just the 1st field value?  Or whichever field value matches your document name?

0 0
replied on March 11, 2016 Show version history

Trying to replace the one that matched the name of the document.  In most cases, this would be the first value.  Maybe even in all cases.  The token is the default value "%(Name)" so that I get at least something in there for key words.

0 0
replied on March 13, 2016

In the Conditional Sequence, could you put the Assign Field Values activity inside a For Each Value?

0 0
replied on March 14, 2016

Thanks, Jennifer.  Just tried it but it still wiped out all values and only left the one (corrected) value in that field.  Can you see anything in here that I could change to make it change only the one value?

0 0
replied on March 14, 2016

Could you retrieve all of your existing field values, then replace them all (with the exception of the one that matched the doc name, which you would want to replace with the new value)?

1 0
replied on March 14, 2016

Mike - retrieve them all, then replace them all?  Then add a new value?  Hey, I was able to make that work!  I have duplicates in here, but better that than having fields that can't be sorted in columns in a useful way.

So, I changed the Retrieve Field Values to collect ALL.  Then changed the Conditional activity to include the Assign Field Values where it makes the correction, plus a second Assign Field Values activity that adds back in everything that it found. 

That gives me a corrected value as the first value that can be used for sorting columns more successfully, but also protects me from losing additional information if one of the staff had added additional key words in the fields.

Thanks, Mike!

0 0
replied on March 14, 2016

Right now you have the assign field values within your for each value so it is replacing all values.  Inside your For Each Value, put the assign value inside another conditional statement.

0 0
replied on March 14, 2016

That's close but not going to work as expected. Assign Field Values either appends or replaces all values for multi-value fields. So you would have to rebuild the value list and then set it back after you've gone through all of them.

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

Sign in to reply to this post.