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 / People picker with IF ...
Power Apps
Answered

People picker with IF statement

(1) ShareShare
ReportReport
Posted on by 549

Hello!

 

I wonder if someone could help me with this please!  I have a people picker field in my app.  And I want to behave like this on the Item property - if they choose Yes, make the people picker choose from a group, if they choose No, make it choose from the directory (like the default);

 

If (radio1.selecteditem.value = "Yes", Office365Groups.ListGroupMembers("groupID").value, Choices([@'List Name'].columnname))

 

However I cannot get it to work at all!  Does the If function not work on item properties?

 

Also if I use the Office365Groups...part on it's own I get the filtered list of people but it won't let me search names, only scroll through a list of names (which is not ideal as there are still many people on it!)

 

Any ideas welcome!

 

Categories:
I have the same question (0)
  • Verified answer
    developerAJ Profile Picture
    4,763 on at

    @RMD211 

     

    it won't work in same combobox because output value of both DataSource choice and group are different.

    easiest choice would be using two comboboxes.

    one with Visible: radio1.selecteditem.value = "No" ; items: Choices([@'List Name'].columnname)

     

    second with Visible: radio1.selecteditem.value = "Yes";items: Office365Groups.ListGroupMembers("groupID").value

    use above formula in new combobox the reason if you are using samcombobox even though you make it search as true it always becomes false its a glitch when you change the datasource of combobox

     

    Also you need to change the update property of datacard

     

    Please click Accept as solution and Thumbs Up. if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • RM-30040732-0 Profile Picture
    549 on at

    Thanks! I ended up using two comboboxes

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard