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 III
Super User III

@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

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 III
Super User III

@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
rsamir
Frequent Visitor

I'm afraid that something missing from my side

rsamir_0-1614621877330.png

 

Am I correct?

 

RandyHayes
Super User III
Super User III

@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

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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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
Top Kudoed Authors
Users online (2,006)