Dear Dev Talk:
I have a list in SharePoint 2010 that has the following fields:
- Status: Submitted, Under Review, Closed
- Running Days Under Review
I am trying to populate the field 'Running Days Under Review' for all items where a 'Status' = 'Under Review'
1. Site Workflow
a. Query List for Created Date and store in Collection Variable DateCreatedCollection
b. For Each Created Date in DateCreatedCollection (collection variable) store in CreatedDate (date variable)
i. Build string:
- abs(datediffdays(CreatedDate, Today)) and store in RunningDays
ii. Update Multiple Items:
- Filter current list where Created = CreatedDate
- Filter current list where Status = Under Review
- Update 'Running Days Under Review' Field with variable 'RunningDays'
I am getting all items with a status of "Under Review" to update, but the WF is calculating only one date in the collection variable and populating each list item with that one dates RunningDays value. I also tried the 'For Each' action on the ID of the list item and I got the same result. Also, it appears you cannot run an inline function on a collection variable?? I have attached my WF, and help will be greatly appreciated!