Filter A SharePoint Multiple Person Type Column With No Delegation Warning

Filter A SharePoint Multiple Person Type Column With No Delegation Warning

Filter A SharePoint Multiple Person Type Column With No Delegation Warning

Setup The SharePoint List

Create a SharePoint list named Projects Backlog with the following columns: 
 

  • ID – autonumber column 
  • Title – text column 
  • ProjectTeam – person column with allow multiple selections set to true

     

ID 

Title 

Project Team 

1 

Time Off Request App 

Ali Shahzad  

2 

Safety Incidents Reporting 

Ahmad Raza 

3 

Job Site Inspection App 

Muhammad Mudassar  

4 

Expense Report App 

Muhammad Ali 

 

Create SharePoint list 'Projects Backlog' with ID, Title, and ProjectTeam columns. Focus= 'Filtering Person Column

Build The Power Automate Cloud Flow

Launch Power Automate and craft a new cloud flow titled ‘FilterMultiplePeople

Creating a 'FilterMultiplePeople' cloud flow in Power Automate for filtering SharePoint Person Column

Integrate the Power Apps V2 trigger that has a mandatory field named ‘Claims‘.

Next, incorporate a ‘SharePoint – Get Items‘ action that focuses on the ‘Projects Backlog‘ list.

Enter the following code into the ‘Filter Query‘ field to filter based on multiple person types in the column. The column name in SharePoint is ‘ProjectTeam‘.

				
					ProjectTeam/Name eq 'triggerBody()['text']'

				
			

Proceed with the process by following these steps.

Apply the filter action: ‘Selected filter‘. 

Filter SharePoint Person Column=Enter code 'ProjectTeam by Name eq 'triggerBody()['text']' and apply 'Selected filter' action

Insert the value of ‘Get items‘ into the ‘From‘ section, and in the Map section, include ‘ID‘, ‘Title‘, and ‘Your SharePoint Person type column name‘.

Populate 'From' with 'Get items' value and map 'ID,' 'Title,' and 'Your SharePoint Person column' in 'Filter SharePoint Person Column

Insert ‘Compose‘ beneath the ‘filter‘.

Position 'Compose' below the 'filter' for better SharePoint Person Column filtering

Place the filter result in the compose input area. 

Insert a new ‘Respond to a PowerApp or flow‘ action beneath the Compose. It should have a mandatory field named ‘response‘. Then, link the output from the Compose to it.

Return The Flow Response To Power Apps

Create a ‘People Pickercombobox menu to choose an individual’s name. Discover how to craft this selector by going through this guide. 

Image of a 'People Picker' combobox menu for filtering SharePoint Person Column in Power Apps

Connect the 'FilterMultiplePeople' flow to Power Apps.

Navigate to the PowerApp where you intend to implement the ‘FilterMultiplePeople‘ flow and establish a connection with it.

Connect 'FilterMultiplePeople' Flow to Power Apps for 'Filter SharePoint Person Column'

“Place this code in the button’s OnSelect attribute. It sends the claims token of the chosen individual to the flow and retrieves a JSON containing corresponding results. Subsequently, the ParseJSON function is employed to transform the JSON into a collection.

				
					colProjects,
    ForAll(
        Table(ParseJSON(FilterMultiplePeople.Run($"i:0#.f|membership|{DataCardValue7.Selected.UserPrincipalName}").response)),
        {
            ID: Value(Value.ID),
            Title: Text(Value.Title),
            ProjectTeam: ForAll(
                Table(Value.ProjectTeam),
                {
                    Claims: Text(Value.Claims),
                    DisplayName: Text(Value.DisplayName),
                    Email: Text(Value.Email),
                    Picture: Text(Value.Picture),
                    Department: Text(Value.Department),
                    JobTitle: Text(Value.JobTitle)
                }
            )
        }
    )
)
				
			

The colProjects collection displays results that match ‘Ali Shahzad‘ in the ProjectTeam field.

Filter A Sharepoint Multiple Choices Type Column With No Delegation Warning

Setup The SharePoint List

Construct a SharePoint list titled ‘Projects Backlog’ comprising the subsequent columns:

  • ID: This is an automatic numbering column.
  • Title: A column for text input.
  • SkillsRequired: A choice column configured to allow multiple selections.

Listed entries are as follows:

IDTitleSkillsRequired
1Time Off Request AppPower Apps
2Safety Incidents ReportingPower Apps, Power Automate, Power BI
3Job Site Inspection AppPower Apps, Power Automate
4Expense Report AppPower Apps, Power BI, Power Virtual Agent

Build The Power Automate Flow

Launch Power Automate and craft a new cloud flow titled ‘FilterMultipleChoices 

Creating 'FilterMultipleChoices' flow in Power Automate for 'Filter SharePoint Person Column'

Integrate the Power Apps V2 trigger that has a mandatory field named ‘Claims‘. 

Integrate the Power Apps V2 trigger that has a mandatory field named 'Claims'

Next, incorporate a ‘SharePoint – Get Items‘ action that focuses on the ‘FilterMultipleChoices ‘ list. 

Next, incorporate a 'SharePoint – Get Items' action that focuses on the 'FilterMultipleChoices ' list.

Enter the following code into the ‘Filter Query‘ field to filter based on multiple person types in the column. The column name in SharePoint is ‘FilterMultipleChoices’. 

				
					Department/Id eq 'triggerBody()['text']' 
 
				
			

Proceed with the process by following these steps.

Apply the filter action: ‘Selected filter‘. 

Filter SharePoint Person Column= Enter code, apply 'Selected filter'

Insert the value of ‘Get items‘ into the ‘From‘ section, and in the Map section, include ‘ID‘, ‘Title‘, and ‘Your SharePoint Person type column name‘. 

Map 'ID,' 'Title,' and 'Your SharePoint Person Type' for 'Filter SharePoint Person Column.'

Insert ‘Compose‘ beneath the ‘filter‘. 

Place the filter result in the compose input area. 

Place the filter result in the compose input area

Insert a new ‘Respond to a PowerApp or flow‘ action beneath the Compose. It should have a mandatory field named ‘response‘. Then, link the output from the Compose to it. 

Insert 'Respond to PowerApp or Flow' action with 'response' field, connect from Compose

Return The Flow Response To Power Apps

Construct a dropdown menu enabling the user to choose a value from the Department lookup options.

Dropdown menu for 'Filter SharePoint Person Column' using Department lookup options

Navigate to the PowerApp where you intend to implement the ‘FilterMultipleChoices ‘ flow and establish a connection with it. 

Connect the 'FilterMultipleChoices' flow to Power Apps for 'Filter SharePoint Person Column'

Insert this code into the button’s OnSelect property. It forwards the selected individual’s claims token to the flow and fetches a JSON with the relevant results. Following that, the ParseJSON function is used to convert the JSON into a collection.

				
					ClearCollect(
    colProjects,
    ForAll(
        Table(ParseJSON(FilterMultipleChoices.Run(DataCardValue3.Selected.Value).response)),
        {
            ID: Value(Value.ID),
            Title: Text(Value.Title),
            SkillsRequired: ForAll(
                Table(Value.SkillsRequired),
                {
                    ID: Value(Value.ID),
                    Value: Text(Value.Value)
                }
            )
        }
    )
)
				
			

If you want to learn more about the Power Apps, feel free to explore our other informative articles and tutorials.

Have additional inquiries? Our team is here to assist. Please don’t hesitate to reach out!

About The Author