Hi MK,
In query list, the order is stored in string variable (as you mentioned String_CurrentOrder), i think you should store it in a collection variable and use collection operation in foreach loop to get the value in each row.
Hi MK,
1. I will save the ID of the list item in the coll_QuotesforOrder collection. And only that in the first Query List action.
2. I will add another query list within the for each loop and then get the values for name and order linked to the current id...so filter on ID = string_QuotesforOrder
3. I think the build string should be fine but to make sure while testing write it away to a log in history action.
4. I will add the update action within the for each loop and update where ID = string_QuotesforOrder and not outside the for loop as you have it currently. So basically this way you will update line by line.
Please let me know if this helped or if any of my steps are unclear.
Hi Francois,
Thanks for the reply.
Question please: in the 2nd QL, do I add the name and order fields in 2 different variables? and should they both be Collections?
Hi M K,
I would add each field in its own String_variable just like you did in your workflow. You can use the existing variables that you have (Name and Order)
The thing is that the for each loop will overwrite these values in every loop and that's also why I suggest you add the update action inside the for loop so that you write away the values in the variables against the current ID and then get the next set of variables in the next loop and so on and so on.
Let me know if you have further issues or questions.
I keep getting this error for some reason: “Coercion Failed: Unable to transform the input lookup data into the requested type.”
Mariam Kabesh
Event Coordinator
+1 (250) 479-3638, 111
1-888-210-7420
www.SSI-corporate.com<http://www.ssi-corporate.com/>
Hi Mariam,
This is usually because you are updating a field of a certain type into something of a different type, i.e. String into a number or date field.
Can you perhaps send screenshots of the list settings for the list that your updating to?
Hi Francois,
Are you referring to the SharePoint list?
Mariam Kabesh
Event Coordinator
+1 (250) 479-3638, 111
1-888-210-7420
www.SSI-corporate.com<http://www.ssi-corporate.com/>
Firstly, in your For Each, you're overwriting the string_DocTitle.
Are you trying to update each quote? If so, you should put your Update Item action inside the For Each.
Also, when you get an error like this, if there's nothing obvious in the workflow history, look in your SP logs.
Finally, instead of using variable, just to see if it works, trying hardcoding the values into the Update Item action and see if that works.
If it does, compare it to the values in your variables and see what the difference is.
cheers,
Vadim
From what I see, it looks like the Order column will always be the same since you are querying it on that too. I may be misunderstanding. But it needs to be a collection and not a string. Also, when you do the update I'd search on the ID. I'd update one by one and then Commit Pending Changes after each one.