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 / Boolean Values for Gal...
Power Apps
Unanswered

Boolean Values for Gallery.Selected

(0) ShareShare
ReportReport
Posted on by 2

Hi Everyone,

 

Is there currently a way in powerapps to perform an if statement to check if a particular gallery has been selected? For instance here is an example of what my thought process is 

 

Under a View Form -> Item Tag

 

If(Gallery1.Selected = true, Gallery1.Selected, If(Gallery2.Selected=true,Gallery2.Selected))

 

Any help or guidance would be greatly appreciated.


Thanks,


Dave

Categories:
  • OneThing Profile Picture
    393 on at

    Hi Dave,

     

    This is a good Question and you are most of the way there.

     

    I've been able to get this functionality working using the following:

    If(
     !IsBlank(Gallery1.Selected),
     Gallery1.Selected.Name,
     If(
     !IsBlank(Gallery1_1.Selected),
     Gallery1_1.Selected.Name,
     "none"
     )
    )

    The only issue you will have is that the Gallery.selected value needs to be reset. I've done this by setting the Default for the galleries as a variable (GalleryReset)

    UpdateContext({GalleryReset:{}});Reset(Gallery1);Reset(Gallery1_1)

     

    I've included my messing about with sample to help you get started.

     

    If you hit reset, the IFGalleryValue will be none. If you select Gallery1_1 (Right Most) it will change to this selected name. If you then select from Gallery1, it will change to this value even if the second gallery is also selected.
    Screenshot_6.pngHope this helps,

    Nicky

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard