You’ll also need another ‘Compose’ inside the loop as a middle step for the expression as you can’t self-reference a variable. Note: again, make sure that you reference outputs from the right actions in the expression. replace(variables('var_htmlTable3'),item(),outputs('Get_user_profile_(V2)')?) Replace in the html table (stored in variable) the currently processed userId with Display Name. And since you know the id, and now also the name, you can replace it in the html table. In each loop it’ll take the current userId, and search for the corresponding user. Inside the ‘Apply to each’ place the ‘Get user profile’ action. Add an ‘Apply to each’ to process all the unique ‘userId’ (output from the union(…) expression). Initialize the string variable and set it to the html table (output from ‘Create HTML table’ action) value. Replace the userId with user name in the html table ![]() And since you can’t modify output of any action, you’ll need a variable. The next step will be to search for a user by its id and replace it in the html table. But before that, initialize a string variable to store the original html table. union(outputs('Compose'),outputs('Compose'))Īnd with the unique ‘userId’ comes again time for the ‘Get user profile’ action. Add another ‘Compose’ with the expression to remove them. They must be removed with the union(…) expression as in the task importing post. The output of this ‘Compose’ will contain the ‘userId’, but it’ll include duplicates. ![]() It must always reference the output of the action where you list the tasks. If I wanted to process output from ‘List tasks’, it would be body(‘List_tasks’)?. Note: body(‘Filter_array_3’) is the output of ‘Filter array 3’ action. join(xpath(xml(json(concat(''))), '/body/value/_assignments/userId/text()') It’s a similar expression as when exporting multiple people picker into. Only this time you can’t use ‘Select’, you must get it directly in the ‘Create HTML table’ with an expression. Similar to the first solution, you’re interested only in the ‘userId’. It’ll take two steps to display user name instead of user id in the table. ![]() As already explained in the post on exporting SharePoint data, you can’t use any action for preprocess the data. For example, when you build a report of the Planner tasks. It gets a bit more complicated if you’re not processing the tasks one by one, but more tasks at once. Create a html table report with the tasks It gets a bit more complicated though if your tasks have multiple assignees. The output of ‘Get user profile’ will be all the available user information for each assignee – display name, email, etc. Add an ‘Apply to each’, use the ‘Select’ output as the input, and ‘Get user profile’ for each of the ids. The output will be an array that’ll contain only the ‘userId’. ![]() You can use the ‘Select’ action in a similar way as when extracting user email addresses from user objects. That’s the user responsible for the task, the information you probably want. In both cases, you must extract the ‘userId’ from the object. There’re two approaches, depending on how you want to process the tasks. If you want to know which user is responsible for the task, you must convert the user ID into user name. No display name, no email address, only the user IDs. There’ll be the ID of the assigned user, when the task was assigned to this user, who assigned it, and more. You’ll receive a whole object that’ll contain much more information. “I’m trying to list the user assigned to a Planner task, but all I can get from Power Automate is some complicated text without any names in you use the ‘assignments’ dynamic content from a Planner task, you’d expect a list of users.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |