I have a workflow which get called from power apps, the workflow accept 2 parameters, as follow:-
1) UserEmail
2) Progress Status
then i want to return the tasks from all the Groups and Plans which are assigned to the user passed from power apps and has its progress status = the passed status from the power apps. currently i have these steps:-
1) Get the UserID for the passed userEmail
2) Initialize and array parameter to store all the related tasks:-
3) get all the Teams, where i am storing the Teams names inside a sharepoint list
4) get all the Office 365 groups
5) Loop through the teams and check if the Team name is inside the Groups:-
6) if so, i get all the plans owned by a group
7) list all the Tasks for the plans
😎 then for the tasks i am looping through the "_assignment" array to check if the userId is inside the assignment array for a task >> if so i will add the task to the array, as follow:-
9) finally i am passing the Array back to power apps, by joining the array with ";" character, as follow:-
now i need to fix and do the following enhancements:-
1) currently i am looping through all the tasks for a Plan, and then i am checking if the user ID is inside the _assignment array for the task.. this is inefficient, so is there a way to filter the Plan tasks by the assignment instead? so i will only get the related tasks, instead of getting all the tasks and do the filtering on the power apps itself?
2) i am unable to filter nor to check the Task's Progress status... i tried to get the details for each task but the returned info does not contain the info for the task Progress column.. this is the Progress column i am talking about:-
3) to return back the tasks, i am joining the Tasks array using the ";" character. but how i can read those tasks inside power apps? i mean if a task info contain ";" characters then the logic will break, so what is the best way to return the array of tasks back to power apps? i am planning to have a gallery showing the related tasks inside our power apps canvas application
can anyone advice on the above 3 points please?


Report
All responses (
Answers (