Hi there,
I have a flow with lists and tasks. When I am creating a task a flow creates a list element and puts the task id into the list. So both are connected to each other.
A second flow checks if a list element has changes and updates the planner task.
My problem is that the information of users in lists have no id's but only emails or names. The task of planner has users only with assigned id.
So I need a solution to get the users id from the list element to compare them with the users id from the task.
I want to compare the users in a task with users in a list. If a user in the task is missing it takes the users from lists and assigned it to the task or delet a user if the user is in the task but not in the list.
Hope my english is o.k. so you understand what I want to do. thx. 🙂
Thanks, it is much easier as I worked on my flow 🙂 With this I can now do my mini Projekt Management using lists. Perfect. Your solution helps me to go to the next steps.
FF 🙂
(FlyingFox)
Hi @FOX23,
You could use a Get User Profile (v2) action to retrieve the user and its attributes (like Email and User Principal Name). You can use that to compare it to person specified in the person or group type of column (AssignedTo in my example) in the list.
Below is an example of such an approach.
1. Id of first assigned user in task in Planner in a Get user profile (v2) action
outputs('Get_a_task')?['body/_assignments'][0]['userId']
2. Get Items action with a Filter which checks if the list item already exists
TaskId eq '@{outputs('Get_a_task')?['body/id']}'
3. Condition which checks if it has found an item
length(outputs('Get_items')?['body/value'])
4. In a nested condition it is checked if the Email of the current AssignedTo user is the same as the one found in the Task
outputs('Get_items')?['body/value'][0]['AssignedTo']['Email']
5. In the update item the id & title are reused from the first matching item via these expressions
outputs('Get_items')?['body/value'][0]['Id']
outputs('Get_items')?['body/value'][0]['Title']
WarrenBelz
146,631
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,991
Most Valuable Professional