
I have a column in a SharePoint list that contains Approvers.
I'd like my PowerAutomate flow to take these Approvers and turn them into a list, an example shown below:
I've tried using both Select and Filter Array statements, but neither are giving me what I'm looking for. Does anyone have any ideas on how to do this? Thanks!
Initialize an Array Variable: Start by initializing an array variable to store the list of Approvers. Go to your Power Automate flow and add an "Initialize variable" action. Set the type of the variable to "Array".
Retrieve Items from SharePoint List: Add a "Get items" action to your flow. Configure it to retrieve the items from the SharePoint list containing the Approvers column.
Parse Approvers Column: Add a "Select" action below the "Get items" action. In the "Select" action, choose the output from the "Get items" action as the input array. Then, use the "Expression" tab to write an expression to extract the values from the Approvers column. For example, if your Approvers column is named "Approvers", the expression might be:
Replace 'Get_items' with the name of your "Get items" action.
Add Values to Array Variable: Use the "Append to array variable" action to add each value from the Approvers column to the array variable initialized in step 1. Set the "Value" field to the output of the "Select" action.
Loop Through Approvers (Optional): If you need to perform any additional actions for each Approver, you can add a "Apply to each" loop after the "Select" action. Set the "Select" action output as the input for the loop.
Use the Array Variable: Now, you can use the array variable containing the list of Approvers in subsequent actions in your flow.
Handle Errors: Make sure to add appropriate error handling to your flow to handle any potential errors during the execution.