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

Question

Question

Workflow if then?

asked on May 11, 2017

Can Workflow be instructed to check every document in a folder, checking for any of a number of specific groups of words in a Subject field and only act if it finds an instance of matching words?

Previously, training documents just had the Course Name in the Subject field.  Now, we have a need to have a Course Name field with a pick-list, in order to better control searches for who took what course.

Lets say the new List Field has six items in it.  We would need WF to search through the training files, look in the Subject fields, look for a match on any of these six groups of words, then, if it found a match, using the next activity of "Assign Field Values" create that match in the new Course Name field, then move on to the next document.

0 0

Replies

replied on May 11, 2017

You can do that with Search Repository. The Workflow can process the search results.

0 0
replied on May 11, 2017

What would the Search look like?  Or, are you saying search for all Cargo Securement in the subject fields, then configure the WF to add the Cargo Securement to the new Course Name field, run the WF; then do another search for Chainsaw Awareness, reconfigure the WF to add the Chainsaw Awareness to the new Course Name field, run the WF; repeat repeat?  I could do that, but there are actually 59 courses in the list.  I just shortened it to make this question easier to explain. 

0 0
replied on May 12, 2017 Show version history

If you have the current value and the new value as columns in a DB table, you can use the following logic:

    search

    for each

    get field value

    lookup

    populate new field

 

I would run a search to find entries where the CurrentField is not empty and the NewField is empty.  The search would be something like:

{[]:[CurrentField]<>"", [NewField]=""}

3 0
replied on May 12, 2017

I'd probably flip that order a little bit for efficiency's sake:  

  1. For each value OR Query Data to get the list of courses
  2. Search ({[]:[FieldName]="ForEachValue_CurrentValue"}
  3. For Each Entry
  4. Lookup updated value
  5. Populate new field

For faster processing, you could spin off steps #4 and #5 into their own workflow that you invoke inside For Each Entry.

1 0
replied on May 16, 2017

I think I need to learn how to use the Custom Query or Query Data activities.  I have no experience with those yet.   A task for another day!

0 0
replied on May 16, 2017

Update:  I could not figure out how to make either a search or the workflow check the words in the Subject field to determine what to use, but I realized this morning that all the documents are in folders based on the courses taken, so I made sure those folders were named exactly the same as the items in the Field List and then was able to get the workflow to find the course name based on the folder each document was in.  That worked and I'm all done!  Thanks, Miruna and Bert!

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

Sign in to reply to this post.