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

Question

Question

ForEach Entry Workflow Activity not including custom field

asked on July 29, 2016 Show version history

I am working on a workflow that will find all the documents in a folder and its sub-folder and rename the documents when the entry name does not match a custom field values. 


I am using the Search Repository activity (called "Find A/P Vouchers") to find all documents in the folder and sub-folders.  I have selected the custom field under the "Fields" section of the activity.  The custom field seems to be pulled correctly because I have also included that custom field in the "Sort Found Entries by" property and the entries are being sorted.  
 

 

In the For Each Entry activity the custom field seems to be blank (it is not blank in the document metadata).  

I know it is blank because my "Branch" is testing to see if the entry name does not match the custom field value and if it does not it is inserting a record in a table.  

The problem is that the Insert Data activity is executed for every entry, which means the condition is always coming back true.

I also know the custom field value is empty in the "Branch" activity because I am inserting the custom field value into the database and it is empty in the database.

 

First question:  The only way I could find to find all documents in all sub-folders was to use the Search Repository activity.  The Find Entries activity did not seem to give me the option to also include sub-folders.  Is this the correct activity to use or is there a better one?

 

Second question:  What am I doing wrong that my custom field value is not being passed from the Search Repository activity (Find A/P Vouchers) and the For Each Entry activity?

0 0

Answer

SELECTED ANSWER
replied on July 29, 2016

I just figured it out. My workflow user does not have permission to that folder!   Security will get you every time!

2 0

Replies

replied on July 29, 2016

Could you check the Conditions tab in the instance details to see how the conditions evaluated?

0 0
replied on July 29, 2016 Show version history

It is evaluating to true.  I would expect it to evaluate to false because the custom field value should be "049584", which is the same value as the entry name.  As you can see, the custom field value is empty.

Here is the Field definition in my Search Repository Activity...

NOTE:  Everywhere I was referring to "custom field" above, the actual field is "Voucher Reference Number".

Here are the property settings for the For Each Entry activity...

0 0
SELECTED ANSWER
replied on July 29, 2016

I just figured it out. My workflow user does not have permission to that folder!   Security will get you every time!

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

Sign in to reply to this post.