ZK007
ZK007

Reputation: 1

Navigate between screens based on checkbox value on power apps

I want to navigate between screen in my application power app, the first screen is this : enter image description here

And based on the checkbox selected, i want to navigate to it. And also navigate between the for screens if more than checkbox is selcted. For example, if i check the first and the last one, i want to go to the screen of the first one, then the screen of the last one. I want to do all the possibility, i tried this code but it's not working enter image description here

Can someone help with this please, thank you in advance !

Upvotes: 0

Views: 1271

Answers (2)

TxTechnician
TxTechnician

Reputation: 308

That is doable. But it would be labor intensive to write it this way. It would be better to use a gallery and a collection to do navigation. But I don't know your app or how you will use it. So here is a way you can do what you want how you would like it.

Don't use multiple if statements which check the values of checkboxes. Doing that will get you in trouble later on. Because powerapps has a tendency to stop recognizing things on screens which are not visible. Instead use variables, which are global (seen everywhere all the time).

It looks like you're only going to a few screens so it shouldn't be too hard.

Create a "Navigate" button which changes its "on select" property based on the variables.

a tip for asking for help. Always share your code in text format so people can easily reproduce your problem. Pictures help, but no one wants to type all this stuff.

You can set the navigate function of your button to be Navigate(If(ReservoirCheckbox,'Reservoir Vertical HCL1',PostechargCheckbox,"Poste de chargement 2',PompCheckbox,'Pomperie 3'))

This will enable you to navigate based on the selected checkbox (note that just referencing the name of an object whose value is true/false is the same as writting "ReservoirCheckbox.Value = true")

Upvotes: 0

Ken Adams
Ken Adams

Reputation: 155

It's doable. On the "next" button, create a collection storing the screens that are checked. Next, you can write an if condition reading the current screen and comparing it with the collection to know which screen to navigate to after the current one.

Upvotes: 0

Related Questions