web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Share point lis...
Power Apps
Unanswered

Filter Share point list People column in dropdown

(0) ShareShare
ReportReport
Posted on by 3,293

Hi there,

I have in my share point list a people column. In that list I have around 20 technicians. I would like to add in my power apps a dropdown "people style" that show the 20 technicians in my list with the photo and display name.

 

I add a dropdown but I am getting the entire company.

How can I filter my dropdown? to limit the only values in my SPL?

thanks in advance.

Regards  

Categories:
I have the same question (0)
  • fnanfne Profile Picture
    260 on at

    Hi sajarac,

     

    I would just create a static dropdown with a custom list. However, you could try the following which might work better...

     

    1) Create a security group in AD containing all the technicians.

    2) Grab the object ID of the group from Azure.

    3) Add the Office 365 Groups connector/data source to your app in order to use the Office 365 Groups connector.

    4) Create a Collection in your app, perhaps on the OnVisible property of the screen, or OnStart of the app itself.

    ClearCollect(colTechnicians,Office365Groups.ListGroupMembers("00628928-g509-4362-ah73-310c2dbd2a47").value)

    **where 00628928-g509-4362-ah73-310c2dbd2a47 is the objectID of the group

    5) Add this collection called colTechnicians to the Items property of the dropdown.

     

     

  • Sajarac Profile Picture
    3,293 on at

    Thank you very much for the prompt response.

    Would you mind to explain the static dropdown list?

    I would like to try that one.

    Many thanks

  • fnanfne Profile Picture
    260 on at

    Hi sajarac,

     

    So, you would still need to use a connector, the Office365Users one. I assume you already have this added?

     

    In your dropdown's Items property, add the following static list with all the technicians. I've only added the first three, you need to add the rest.

     

    ["Technician One","Technician Two","Technician Three"]

     

    Now you can add an Image and a Label control.

     

    In the Image property of the Image control, add the following. Again, I only added the first three, you need to add the rest

     

    If(Dropdown1.SelectedText.Value = "Technician One", Office365Users.UserPhotoV2("technician.one@companyemail.com"),
    If(Dropdown1.SelectedText.Value = "Technician Two", Office365Users.UserPhotoV2("technician.two@companyemail.com"),
    If(Dropdown1.SelectedText.Value = "Technician Three", Office365Users.UserPhotoV2("technician.three@companyemail.com"))))

     

    In the Label's Text property, you can add the following if you want to display the user's department. Replace "Department" with any number of AD parameters like DisplayName, Manager, City, Phone number(s) etc etc.

     

    If(Dropdown1.SelectedText.Value = "Technician One", Office365Users.UserProfile("technician.one@companyemail.com").Department,
    If(Dropdown1.SelectedText.Value = "Technician Two", Office365Users.UserProfile("technician.two@companyemail.com").Department,
    If(Dropdown1.SelectedText.Value = "Technician Three", Office365Users.UserProfile("technician.three@companyemail.com").Department)))

     

    I like to overcomplicate things, so there's most likely a more efficient solution, but this'll do the job.

     

    Just thinking about it, it might also work if you create a new SharePoint list with all the Technicians, then merely reference this list in your dropdown, as opposed to statically creating the list using ["",""]

  • Sajarac Profile Picture
    3,293 on at

    Hi, thank you very much for this very well explain solution.

     

    For this: "Just thinking about it, it might also work if you create a new SharePoint list with all the Technicians, then merely reference this list in your dropdown, as opposed to statically creating the list using ["",""]"

     

    I have a Share point list with all the technicians required listed. But I guess you clear my mind. Maybe instead of having a people picker column I should just add the technician's email and then do the rest in the combo box?

  • fnanfne Profile Picture
    260 on at

    There are many ways to scratch a cat, sometimes just need to find the best way.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

#2
11manish Profile Picture

11manish 224

#3
Valantis Profile Picture

Valantis 181

Last 30 days Overall leaderboard