I have a Nintex workflow on SP2013 which is failing to update a second lists value inside of a "For Each" loop. If I comment out (dis-able) the "Update" action the workflow succeeds. If I re-enable the update (it fail).
reg. your further discovery, it still sounds to me to be permission problem.
so to ad to Giacomo's hints, I would try to add query list action before/instead update action, setup just the same query conditions checked whether it really identified the row and single row you think it should.
and just to have full picture, could you provide info what are datta types of "Periodical Key" and "mJournalToProcess"?
can you provide more details?
what's setup of your update action? what's datatype of field in other list that you try to update?
does it fail immediately with first iteration or does it at some later iteration? does it always fail on some specific current or other list's item?
what's the error message?
Here are more details on my issue:
Destinantion list "Notifications-Matrix-Subscribers" with the column to be updated "Subscribers E-Mail"
Where: "Periodical Key" (column that matches the variable "mJournalToProcess" for the current item in the collection being processed
Field: "mSubscribersEmails-Journals" (Data type: multiple lines of text
The step shown in the design canvas:
When the UPDATE is enabled the history shows the error:
When the UPDATE is disabled it succeeds (highlights in the comments below show where the UPDATE would have executed:
very first thing to check - does the user account that runs workflow resp. that effectively runs update action have sufficient permissions on the other list and respective item?
what is datatype of target 'Subscribers e-mail' field?
I assume you have proven that where condition correctly matches single item in the other list...
Yes, user has permissions on destination.
The data type is "Multiple lines of text", I also made it Text just to confirm no issue 0 same failure.
My further discovery was to:
Is there a limit on Updates that's not logical?
could you try (just for test) to calculate the variable only for an item and then try to update it outside the loop?
Does the error occur also if you hard-code the value in the update item action instead of using variables?
This may help to understand if the issue is in the values that are used in the action or something else.
The "Query List" action returns nothing when using the TEXT variable "mJournalToProcess" however when I use an ID of a single item I seek, the Query List action returns results.
Both the Periodical Key and mJournalToProcess are of Type String (text).
I think this is the problem. the condition doesn't match a record in the other list.
if I look closely on your logs, it looks like there is a space at the beginning of the string, like " Canadian Journal of economics (0)"
can you try to enclose mJournalToProcess in where clause by fn-Trim() function?
Not sure what the trigger was, but adding a Query List action and changing it from one variable to another seemed to get the Workflow unclogged.
Initially it still failed, so I set it to use an items ID then back to my initial variable - and it started working.
I used a hard reference like for the value destination to be updated to like "Value123" still - no success.
Have you also tried an hard reference for the where clause?
What if, instead of using your clause, do you use a where based on ID? I know it may be not suitable to your final case, but it could help troubleshoot..
Also, what type are all the field/variables involved in the where and in the update?
Both are of type String (text).
Retrieving data ...