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 Apps
Answered

Gallery Transition

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

In a previous message by another user the Power Apps Hero stated that Power Apps does not support transition to a screen based on the contents of a field in the Gallery. However, one could transition to a Screen 1 if 'Screen 1' was in the Gallery. Where as if a specific title (i.e. Bus Driver), was in the Gallery a New Employee edit form screen would open. But, if different specific title (i.e. School Teacher) appeared the Transfer Employee edit form screen would open.

 

Can anyone provide clarification as to whether the above transition configuration is possible?

 

If(ThisItem.Value = "Screen1",Navigate(Screen1,ScreenTransition.Fade), ThisItem.Value = "Screen2",Navigate(Screen2,ScreenTransition.Fade),ThisItem.Value = "Screen3",Navigate(Screen3,Fade))

 

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous 

    Yep, totally possible. You could even re-write that formula if you like, like this

     

    Switch(ThisItem.Value,
     "Screen1",Navigate(Screen1,ScreenTransition.Fade),
     "Screen2",Navigate(Screen2,ScreenTransition.Fade),
     "Screen3",Navigate(Screen3,Fade)
    )
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    So, how would I edit the below to transition to 'New Employee' form if 'Teacher, Doctor, Butcher or Athlete' appear in the title field of the Gallery. And, if 'Bartender, Astronaut, or Zookeeper nothing happens - if possible trigger an error or help message like 'No Update Allowed' form, 

     

    Switch(ThisItem.Value,
     "Screen1",Navigate(Screen1,ScreenTransition.Fade),
     "Screen2",Navigate(Screen2,ScreenTransition.Fade),
     "Screen3",Navigate(Screen3,Fade)
    )

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous 

    Like this

    Switch(ThisItem.Title,
     "Teacher",Navigate('New Employee',ScreenTransition.Fade),
     "Doctor",Navigate('New Employee',ScreenTransition.Fade),
     "Butcher",Navigate('New Employee',ScreenTransition.Fade),
     "Athlete",Navigate('New Employee',ScreenTransition.Fade),
     Notify("No Update Allowed", NotificationType.Error)
    )

    Notify can also be:

    - Screen transition to an empty screen with a label that says "No Update Allowed", or

    - A PopUp, but this is more work

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Do you want to add navigation buttons in the gallery?

    case1:ThisItem.Title in ["Teacher", "Doctor", "Butcher" ,"Athlete"]

    Navigate to 'New Employee' screen

    csse2:ThisItem.Title not in ["Teacher", "Doctor", "Butcher" ,"Athlete"]

    Pop up error message

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

    1\My data source is a collection:

     

    ClearCollect(GalleryTransition,{Title:"Teacher"},{Title:"Doctor"},{Title:"Butcher"},{Title:"Athlete"},{Title:"Bartender"},{Title:"Astronaut"},{Title:"Zookeeper"})

     

    2\Add a gallery

    3\Add an arrow into this gallery and set it's OnSelect proeprty to:

     

    If(
     ThisItem.Title in [
     "Teacher",
     "Doctor",
     "Butcher",
     "Athlete"
     ],
     Navigate('New Employee'),
     Notify("No Update Allowed")
    )

     

    28.gif

    Best Regards,

    Bof

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I entered the following.

     

    I get the following error message - "Name isn't valid. This identifier isn't recognized". 

     

    Power Apps apparently doesn't like that I'm referencing the contents of and Html Text field in the Gallery.

     

    BTW, I'm using Html text fields so that I can create a black label and blue content (i.e. - Cert Title: Professor)

     

    Thoughts on how to correct the error?

     

     If(
        ThisItem.HtmlText1 in [
          "FitnessPEB",
          "Medical",
          "SCBA Fit Test",
          "Live Fire Refresher",
    ],
    Navigate(CertQualDtlScrn),
    Notify("No Update Allowed")
    )

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous 

    Use two standard labels instead of one HTML.text label in your gallery and colour them accordingly. Then reference the label that has "FitnessPEB", "Medical", etc in your formula

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    A small edited, see below, did the trick. Thank you!

     

    If(
    ThisItem.Title in [
    "Title1",
    "Title2",
    "Title3",
    "Title4",
    ],
    Navigate(...Scrn),
    Notify("No Update Allowed")
    )

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard