I am creating a project management site. It will be comprised of three primary lists. Projects, Tasks, and Issues. Both the Task and Issues list have a "Project Name" field, which is a lookup to the Projects list. This way I can tie them all together. I will then have a project dashboard page showing the status or project health by red, yellow, green lights.
My question is, how can I get all the tasks associated with a project? Keep in mind this is a basic task list, not workflow tasks. I then need to do a math operation to get a percentage of tasks that are overdue, and assign it a status back in the Project list.
I have site workflow, as shown in the attachment, which will run periodically throughout the day. Currently it is getting a total of all the tasks and overdue tasks. How can I get them on a per project basis instead of a grand total? I'm assuming I need a collection variable, like I'm already doing for the task list collections, but not sure how to take it one step further so that I'm getting the numbers per project instead of the whole task list.
you will have to use loops.
- first query all the projects into a collection
- start for each loop over projects collection
- within loop query for all the task filtered by current project of a loop. store result to another collection
- calculate your stats and make project update
I'm a novice with Collections and Loops. Could you please give a few more details? My workflow errors out exactly at the loop. It's not even processing what's inside of it. No other information is given other than "an error has occurred".
I'm querying the Projects list and storing all the list item ID's in a collection variable. Then in the loop, I'm using that same collection variable as the "Target Collection" and storing the result in a Project ID variable, which is a List Item ID type.