Sharepoint 2010 workflow aggreagte one list to another using multiple
conditions
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!
Workflow:
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
No comments:
Post a Comment