Question

Workflow only updating the current item

  • 2 April 2024
  • 4 replies
  • 58 views

Badge +3

I have a workflow which is supposed to update 3 fields per item and for the the whole list but seems to just update the C

urrent item. the query list action is on all list items and is essentailly building a collection:

I then use a ForEach so cycle through the collection and updating as it goes:

is there something I’ve missed ?

Regards


4 replies

Userlevel 6
Badge +12

Hey Julian,

 

If your QueryList is just returning the IDs of the items to update then you could change the output parameters to generate a collection of IDs like this:

 

That will save you having to parse the output later on.

 

The other thing that I’d look at is your update list item action.  How come you have three of them in your workflow?  You can use one action to update 3 columns at once and double check that you’ve changed the target list in that action from “Current Item” to the name of the list that you’re trying to update.

 

Cheers,

Chris

Userlevel 5
Badge +20

Hi @julesnye 
Did this response help answer your question? 

Badge +3

I’ve not had chance to do this as I’ve been away on leave.

I’ll try to get to this next week.

Badge +3

It seems to work but it wont work on site workflows as update action is a slightly different config and I get the following error, shown below the config screenshot

RequestorId: ae130e2a-6245-d24b-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentNullException: Value cannot be null. Parameter name: value at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) at Microsoft.Activities.Expressions.ParseNumber`1.Execute(CodeActivityContext context) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Exception from activity ParseNumber<Double> AssignOutputParameterStep Sequence ForEachKeyValuePairStep ForEachSequence If DynamicValue Is Not Empty And Number of Items Greater Than 0 For Each Sequence Flowchart update text fields Workflow.WorkflowXaml_0496ca82_b6e3_458a_b326_d3b0f6dd3a09

 

 

Reply