Solved! Go to Solution.
Here is one possible approach to your problem. The flow produces an email message text for each user in the SharePoint List that has a task in the Excel file:
This is the high level flow:
(1) Starting with Get Items and List rows present in a table actions:
(2) We create an Apply to Each loop, and for each SharePoint item record, we will try to find a matching user record in the Excel data. We can use the Filter Array function find and select these user records. Get get all the Excel rows where the SharePoint column user name (TeamUser) matches the Excel column User:
(3) We can use the Select action to select only the Tasks for that user from the Filter Array action. This way we can ignore any other user data we dont need or want to see:
Example:
(4) Next we check the output of the Select action to find out if any tasks were found:
If Yes, we can construct the email text body including a task list in a Compose action:
And if no tasks were found we construct a different email text in a Compose action:
Here is a summary of the condition:
Hope this helps.
Ellis
Here is one possible approach to your problem. The flow produces an email message text for each user in the SharePoint List that has a task in the Excel file:
This is the high level flow:
(1) Starting with Get Items and List rows present in a table actions:
(2) We create an Apply to Each loop, and for each SharePoint item record, we will try to find a matching user record in the Excel data. We can use the Filter Array function find and select these user records. Get get all the Excel rows where the SharePoint column user name (TeamUser) matches the Excel column User:
(3) We can use the Select action to select only the Tasks for that user from the Filter Array action. This way we can ignore any other user data we dont need or want to see:
Example:
(4) Next we check the output of the Select action to find out if any tasks were found:
If Yes, we can construct the email text body including a task list in a Compose action:
And if no tasks were found we construct a different email text in a Compose action:
Here is a summary of the condition:
Hope this helps.
Ellis
Thanks a lot!
Just one question, I don't understand how the "Select" indicates that the map should take the value "Task", in the dynamic content of the map section i only see the options "Element" and "Body" and I don't know how to tell it to take the value "task" from the filter array
Thanks for the reply
Please press the small icon to toggle the mode to text mode:
Ellis
Thank you very much, I had not seen that little button, one last question, if also in excel I had a column called "priority" with values of (1, 2, 3) like:
How could I relate the "task" array to the "task priority" array returned by select operations?
So that in the email the tasks are listed by their priority, for example:
Dear Anthael
Your tasks are:
Priority 1: 6474
Priority 2: -
Priority 3: 3424
I think of making an apply to each to go through the tasks and a counter and relating them by the indexes, but I don't think this is the most optimal way to do it.
Anyway, thanks for your response!
This will require a small change to the flow. We can join the text for Task Priority and Task together in the Select action to produce an email body text like this:
The expression to enter is:
concat('Priority ', item()?['Task Priority'],': ',item()?['Task'])
Ellis
Thanks, more than the solution to my problem was what I learned from your answers!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
45 | |
16 | |
15 | |
14 | |
13 |
User | Count |
---|---|
78 | |
40 | |
28 | |
22 | |
19 |