I'm having a little problem getting my aggregation list workflow to run correctly.

I have two lists (A, B) on a site and a workflow associated to List A. My goal is to keep track of total project hours by analyst and week (List B) based on the log entries in List A. So, once the conditions are met, it would update the Total Minutes column on List B otherwise it would create a new item in List B.

My workflow runs automaticall when a new item is started in List A, and I would like it to check if the ListA:WeekNumber field (caluclated) on the Current Item is equal to the WeekNumber in List B, and if the CurrentItem:Analyst is equal to List B Analyst.

I can get this workflow to work with only one condition based on Analyst but with this second condition of WeekNumber, it only checks the first item in the list and if it doesn't match it then adds a new item so that only one week is actually aggregating. Below are the steps I am currently trying.

I only have access to SharePoint Designer 2010 for this solution and do not know much about coding.

I appreciate your help!


Set Variable:PreviousVal to ListB:PreviousMinutes(where ListB:Analyst =
    CurrentItem:Analyst(by:display name))

If CurrentItem:WeekNumbr equals ListB:WeekNumber(Where ListB:Analyst =
    CurrentItem:Analyst(by:display name)) AND Variable:PreviousVal is
    greater than 0

Update item ListB:PreviousMinutes to ListB:TotalMinutes(
    Where ListB:Analyst = CurrentItem:Analyst(by:display name)) 
        then Set Variable:PreviousValNew to ListB:PreviousMinutes(
            Where ListB:Analyst = CurrentItem:Analyst(by:display name)) 
                then Calculate CurrentItem:TotalMinutes plust
                Variable:PreviousValNew(output to Calc) then
                update ListB:TotalMinutes to Variable:calc

ELSE IF create item in ListB

1 Answer 1


I figured this out.

I added a calculated field to my List A that concatenated the Name field and the Week field into a string and also added a single line text field to List B called NameWeek. I then wrote my workflow to update the total time column in list B when a new item was entered into List A where ListA:NameWeek equaled ListB:NameWeek if the previousvalue variable was greater than 0, else it created an item in ListB.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.