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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Option set in gallery
Power Apps
Unanswered

Option set in gallery

(0) ShareShare
ReportReport
Posted on by 147

Is it possible to use the values contained in an option set for one of your fields, as options in a gallery?

 

E.g. from the field Gender has option set for male and female. And in the gallery it shows male and female as the two items, each leading to the records that are either male or female.

I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @atray13 

    Are you using your gallery to display data or to collect data?

  • Hamish Sheild Profile Picture
    3,005 Most Valuable Professional on at

    Hi @atray13,

     

    Or are you looking to filter the gallery based on gender?

  • v-yutliu-msft Profile Picture
    on at

    Hi @atray13 ,

    Do you want to show option set field as radios in gallery?

    Like the screen shoot:

    5121.PNG

     If so, I 've made a similar test for your reference:

    1)in my test, my entity named: testmanies, my option set field named 'ExpenseStatus ', my custom option set named test123

    2)insert a gallery, set its Items:

    testmanies

    insert a radio button inside the gallery, set the radio's Items:

    Choices(testmanies.'ExpenseStatus ')

    set the radio's Default:

    ThisItem.'ExpenseStatus '

     Then the radio will display the option set field.

     

    If you want to use this radio to update option set value, you could use formula like this:

    Patch(testmanies,ThisItem,{'ExpenseStatus ':Radio1.Selected.Value})

    Then the radio will be used to display and update this option set value.

     

    5122.PNG

     

     

    Best regards,

     

  • atray13 Profile Picture
    147 on at

    Hi all thanks for the comments.

     

    What i am trying to achieve is a gallery that displays these options like in the screen shot, where the items in the gallery are that of the option set for a field in the source data. So that say they clicked on the male option in the gallery this will take them to the next screen with a different gallery that displays all of the records that have male recorded as their gender.

     

    Option galleryOption gallery

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @atray13 

    Although someone else will come up with an answer for you, I usually avoid using option sets in this type of situation.  Instead, I would use a simple text field in the dataset and control the user input using a radio control with items property ["Male","Female"].  (to be completely "PC", maybe add "Other").  Then, you can display the result in your gallery as a simple label.  PowerApps option sets are actually a small table with an ID and Value.    

  • Verified answer
    v-yutliu-msft Profile Picture
    on at

    Hi @atray13 ,

    Ok, this is possible.

    Try this:
    1)gallery1 (option set column)

    Items: 

    Choices(testmanies.'ExpenseStatus ')

    //Choices(entityname.optionsetfieldname)

    2)gallery2 (filter option set field based on the selected of gallery1)

    set gallery2's Items:

    Filter(testmanies,'ExpenseStatus '=Gallery1.Selected.Value)

    //Filter(entityname,optionsetfieldname=Gallery1.Selected.Value)

     

    Please replace with your entity name, optionset fieldname and gallery name.

     

     

    Best regards,

  • atray13 Profile Picture
    147 on at

    Perfect thank you.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard