cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rsamir
Frequent Visitor

Condition before navigate to another screen

Capture.PNG

 

I need to add a condition with Continue button that selection is mandatory for one desk

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions

I used this one and it works now

If(CountRows(Filter(galleryAvailDesk.AllItems, cbDeskSelect.Value))>=1, Navigate(Confirm))

 

Thank you so much

View solution in original post

6 REPLIES 6
RandyHayes
Super User
Super User

@rsamir 

Please consider changing your Formula to the following:

If(CountRows(yourGallery.AllItems, yourCheckboxName.Value)>0, Navigate(Confirm))

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thank you for your answer

There is no number 

This app is for booking a desk before coming the company 

So I have sorted from Desk 1 to Desk 22 (we have 22 available desks)

I figured out that some users can continue without selecting any desk 

So I want to make the selection mandatory before pressing continue then will be at confirm screen

RandyHayes
Super User
Super User

@rsamir 

 

If(CountRows(yourGallery.AllItems, yourCheckboxName.Value)>0, Navigate(Confirm))

 

Is the formula you need!

 

I assume this is a Gallery 

 
 
 

So, just put the name of that Gallery and the name of the checkbox control you have in the gallery into the formula above.  It will only navigate if at least one desk is checked - as you wanted.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
rsamir
Frequent Visitor

I'm afraid that something missing from my side

rsamir_0-1614621877330.png

 

Am I correct?

 

RandyHayes
Super User
Super User

@rsamir 

Your formula is incorrect.  The one I provided is what you need:

If(CountRows(yourGallery.AllItems, yourCheckboxName.Value)>0, Navigate(Confirm))
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

I used this one and it works now

If(CountRows(Filter(galleryAvailDesk.AllItems, cbDeskSelect.Value))>=1, Navigate(Confirm))

 

Thank you so much

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,296)