Hi, I have 2 lists, one is a list of submitted training, one line per item/person
The 2nd list is a persons records. One line for the person and columns of dates when they had the training...
Once an item is added to the first list it updates a date on the 2nd via a flow
My current flow isn't fit for the job... as if too many items are added to list 1 it has conflicts on list 2 when updating the same person in 2 columns.
The flow has 120+ if statements in the 'update item' 😮
They look like 120 variants of:
if(equals(outputs('Get_item')?['body/Title'], '100 induction'), outputs('Get_item')?['body/Date'], Items('Apply_to_each')?['OData__x0031__x0020__Inducti'])
So if the column name matches the course name, add the date.. The kicker is that if the column name doesn't match but there's already a date in the cell i need to re add it
Breaking scenarios:
- 2 items of training added in close succession means the 1st flow run is blocking the next and i get a fail
- If i add a 'do until status doesn't equal 400' then the 2nd item tries writing till success BUT it holds the data from the get item which doesn't have the data it was waiting to write.. meaning it writes its bit plus removes what was written just milliseconds before
My boss suggests changing to a Switch, the whole idea breaks my heart 😞
Can i either:
- make the flow wait till the line is free before getting the item
- Lock the item before it starts the get item then unlock after
- OR
- Stop the flow writing out of date data onto of new?

Report
All responses (
Answers (