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 / Restrict 'Yes/No' fiel...
Power Apps
Unanswered

Restrict 'Yes/No' field to one YES

(0) ShareShare
ReportReport
Posted on by 383

Hi Power Apps Community,

I am trying to build an app where in a Gallery of items I have a field - let's call this FieldA, which is a 'Yes/No' field. Out of all the items in the Gallery, if FieldA is 'Yes' for any one item, then you may not have 'Yes' for any other item in the Gallery.

I would really appreciate any assistance.

Thank you in advance.

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    Can you show a screenshot?

    Meanwhile try:

    If(ThisItem.Column="Yes","Yes","No")

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Data_Enthusiast Profile Picture
    383 on at

    Hi @eka24 

    Sure. The screenshot below would show a list of all the items in the Gallery. Out of all the items in the Gallery, a user may only select one of the items to be identified as a 'Main Item'. If one is identified, all other items should be false.

    Data_Enthusiast_0-1604386944699.png

    The screenshot below shows the control used to select whether the item is a 'Main Item' or not.

    Data_Enthusiast_1-1604386962411.png

    Hope this helps. 

     

  • eka24 Profile Picture
    20,925 on at

    It seems the Toggle used to select main item is not inside the Gallery. 

     

    If(Toggle1.Value,"true","false")

    If that doesn't work, click the items inside the Gallery to display the ThisItem

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • Data_Enthusiast Profile Picture
    383 on at

    Hi @eka24 

    Yes, there is a separate Details Page for editing the fields.

    With regards to your code, which property of the Toggle would I add the code to?

  • eka24 Profile Picture
    20,925 on at

    Please in design mode, click inside the Gallery to display the formula in the Label and take a screenshot

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Data_Enthusiast Profile Picture
    383 on at

    Hi @eka24 

    This is the formula used for the Label.

    Data_Enthusiast_0-1604402150864.png

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard