Showing results for 
Search instead for 
Did you mean: 
Impactful Individual
Impactful Individual

code help please

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 

Power Apps
Power Apps


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

Impactful Individual
Impactful Individual

Hi @Carsten_Growth 


But I havent used the switch function before.

How will it know which screen to navigate to?

take a look here 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?

Impactful Individual
Impactful Individual

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 

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

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, ...

Helpful resources

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,901)