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 / If statement for Brows...
Power Apps
Unanswered

If statement for Browse Gallery

(0) ShareShare
ReportReport
Posted on by 204

Hello there, 

 

I need a hand with an expression here. I have a basic "Submission History" Gallery that shows items submitted in SharePoint. Because Powerapps doesn't support content types different content types, I have made an invisible choice column in each form that basically automatically selects the "Report Type". So now when  I go to Submission history, I need an If statement to determine what navigation screen it will go to. This is what I tried on the On Select property of the Gallery:

 

If(BrowseGallery2.Selected.'Report Type'.Value="Incident Report", Navigate('View Secreen- Incident Report')

 

but obviously that didn't work. Any help would be appreciated!

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    I did this using a Switch() function on the OnSelect property of a gallery.

     

    Switch(ThisItem.ReportType,"Incident Report",Navigate(Screen1))

     

    You could do it using an If statement, but it would get messier the more values you look for since you would have to nest them in the "false" argument.

     

    If(ThisItem.ReportType="Incident Report",Navigate(Screen1),false)

     

     

     

     

     

     

     

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard