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

Discussion

Discussion

Workflow Modify ForEachEntry tokens is permeating across all future loops

posted on May 11, 2022

The value of ForEachEntry tokens are modified each time you are working with a new entry. If I modify the value in one instance using the Modify Token Values activity, why is the value for all entries to come now my modified value.

If I modify a token value, I never expect to stop all future modifications of that token value. The token should still be able to be modified through any means and should act as a normal token even though I temporarily modified the value.

That is what is intuitive anyways, since in coding languages, modifying a variable does not stop any other modifications or functions acting on it in any way, it only temporary sets the variable to your new value.

ForEachEntry tokens should contian the value for that entry at the start of the loop.

1 0
replied on June 22, 2022 Show version history

Fixed in Workflow 11 update 1

2 0
replied on May 11, 2022

Yes, that is a bug, those tokens do no support setting their values. Reference ID #377502. We'll update the documentation to indicate that and fix Workflow so Assign Fields does not modify the value.

Use a separate token instead or modify your search to treat entries with blank values separately from the ones with a value.

3 0
replied on May 11, 2022

Which specific token(s) are you modifying?

0 0
replied on May 11, 2022

ForEachEntry_Email, ForEachEntry_Address1, etc etc

We are modifying the value if it is blank, to be a value which tells the 3rd party software we are integrating with that the value is not to be set.

0 0
replied on May 11, 2022 Show version history

Is this looping through documents/folders and checking field values?

Other than the Iteration token, all of the ForEachEntry tokens should start with

ForEachEntry_CurrentEntry_

 

UPDATE: I just ran a test and got the exact same results. Seems like a bug to me.

It works on the first pass, but once you've modified the "current entry" token value, it overrides the actual "current" data for all subsequent iterations.

0 0
replied on May 11, 2022

It is looping through documents with field values yes. Sorry the specific syntax is ForEachEntry_CurrentEntry_Email 

In any case, if I replace a variable value, it should not be altered or locked in any way and my value should not permiate all future states of the variable. This is just not  naturally logical or defined when using the object, it really threw me for a loop (no pun).

1 0
replied on May 11, 2022

Yea, I got the same results and it does seems like a bug/unintended behavior.

I also tried with a For Each Value and a For Each Row but didn't have the same issue, so it seems to be specific to the For Each Entry activity.

2 0
replied on May 11, 2022

Thanks for running your own test!

Another way of looking at it is that ForEachEntry_CurrentEntry should be a new token at the beginning of each loop, hence the words "CurrentEntry"

Interesting that it only applies to For Each Entry and works correctly on the other loops

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

Sign in to reply to this post.