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 / Prepopulate Dropdown f...
Power Apps
Answered

Prepopulate Dropdown for Filtering Based on Security Role

(0) ShareShare
ReportReport
Posted on by 80

I have a gallery whose items I am currently filtering by a dropdown.  I added a conditional statement to filter the items based on a security group.  If a user is part of a specific security group, I want to filter the items to a specific dropdown value.   Everything works fine, unless I want to give this security group the ability to show all items.   The dropdown is populated by a Collection, which is populated by a Choice SP column.  I had to place the Choice column into a collection so that I could set the first value to Blank() to allow users to see all items.

 

My current formula is as follows:

 

 

If(IsUserAdmin,
Filter(Listname, ChoiceField.Value="Status A" Or ChoiceField.Value=dropdown.Selected.Value),
Filter(Listname, dropdown.Selected.Value=Blank() || ChoiceField.Value=dropdown.Selected.Value))

 

 

 

 The problem is, if I add "Or ChoiceField.Selected.Value=Blank()"  to my true statement, the gallery shows all items because the default value is Blank().   Is there a way to set the Choice Field to a specific value by default using the conditional statement above?    So far, I've set the default value on the dropdown to a variable, and then attempted to write the If statement on the 'OnVisible; property as follows 

 

 

If(IsUserAdmin, Set(varRole, Status A))

 

 

 

 This caused an error.  Any ideas on how to make this work?

 

Categories:
  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @illmatic_one ,

    I have a blog on this subject that may be of assistance.

     

    Please click Accept as solution 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.

    Visit my blog Practical Power Apps

  • illmatic_one Profile Picture
    80 on at

    Hey Warren,

    Thanks for the link, but this does not fit my use case and unfortunately isn't really related to my issue.  Thanks anyway and hopefully someone else that happens upon this finds it helpful!

  • Verified answer
    illmatic_one Profile Picture
    80 on at

    I was able to resolve this by putting my conditional statement on the default value, and taking the conditional statement off the Items property. 

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @illmatic_one ,

     

    Please consider Accept your reply as the solution to help the other members find it.

     

    Best regards,

    Community Support Team _ Jeffer Ni

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
timl Profile Picture

timl 122 Super User 2026 Season 2

Last 30 days Overall leaderboard