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
Unanswered

code help please

(0) ShareShare
ReportReport
Posted on by 1,625

Hello all,

I have a canvas app, with SPO as its datasource.

I have a scenario where User1 has completed a section of the form.

User2 has now come to section2 to enter up to 7 reviewers (this is a case by case scenario, sometimes 2 reviewers sometimes 1, other times 5)

I have on that screens OnVisible created a variable Set(MyReviewer1,Lbl_Reviewer1.Text);// and so on for each reviewer (this is to cater for another scenario).

On my next button I want to it to be able to only navigate to a screen which has a reviewer entered by User2. So if User2 has entered Reviewer1 then the next button should navigate to Reviewer1Screen, but if User2 entered the names for Reviewer2 and 3 navigate to Reviewer2Screen then Reviewer3Screen.

I want to avoid the scenario where users need to click through 7 screens when there will be data on say 3 screens.

Is this possible?

I have a status column to cater for which reviewers complete there sections but not sure how I achieve this? 

Thank You 

Categories:
  • Carsten_Growth Profile Picture
    Microsoft Employee on at

    Switch(Scenario,

    Reviewer1, Navigate(Screen1, Fade),

    Reviewer2, Navigate(Screen2, Fade),

    Reviewer3, Navigate(Screen3, Fade)

    )

    The code might look like to simple, but the logic inside a Switch() function should help you to select based on your scenario

  • Lefty Profile Picture
    1,625 on at

    Hi @Carsten_Growth 

    Thanks

    But I havent used the switch function before.

    How will it know which screen to navigate to?

  • Carsten_Growth Profile Picture
    Microsoft Employee on at

    take a look here https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if for further documentation. OnSelect of one of your footer items, you would set a variable. Let´s say it becomes 1, 2 or 3. Then you can type something like Switch(variableName,

    1, Navigate(Screen1, Fade), //do action when variableName = 1

    2, Navigate(Screen2, Fade) //do action when variableName = 2

     

    Got the idea?

  • Lefty Profile Picture
    1,625 on at

    HI @Carsten_Growth 

    Afraid not, im not from a developer background.

    Some help if you can, would be appreciated in terms of the code I would use on my button, or maybe if you have similar code, just so i can get the idea with how to use it 

  • Carsten_Growth Profile Picture
    Microsoft Employee on at

    You don´t need developer background. I already provided you a sample with

    Switch(variableName,
    1, Navigate(Screen1, Fade), //do action when variableName = 1
    2, Navigate(Screen2, Fade) //do action when variableName = 2
    )

    All you need to do is use variableName and OnSelect of your buttons to show specific gallery set it to be 1, 2, ...
     

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard