cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
krickard
Level: Powered On

How do you check multiple controls for an entry before moving to the next screen?

I'm sure this is going to be something simple that I'm just overlooking, but so far I have not been able to figure out how to check multiple controls to ensure they have data entered before moving to the next screen. So far I've only gotten the one control to work.

 

In what part of this statement do I add the other two controls that I want to check?

 

If(!IsBlank(inpAnswer_1.Text), Navigate(AddQuestion1, ScreenTransition.Fade,{vcheck1:false}), UpdateContext({vcheck1:true}));

 

The other two controls are named inpAnswer_2 and inpAnswer_3. All three controls are text controls. 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: How do you check multiple controls for an entry before moving to the next screen?

Try

If(!IsBlank(inpAnswer_1.Text && !IsBlank(inpAnswer_2) && !IsBlank(inpAnswer_3)), Navigate(AddQuestion1, ScreenTransition.Fade,{vcheck1:false}), UpdateContext({vcheck1:true}));

Let me know if this helps.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

View solution in original post

7 REPLIES 7
Super User
Super User

Re: How do you check multiple controls for an entry before moving to the next screen?

Try

If(!IsBlank(inpAnswer_1.Text && !IsBlank(inpAnswer_2) && !IsBlank(inpAnswer_3)), Navigate(AddQuestion1, ScreenTransition.Fade,{vcheck1:false}), UpdateContext({vcheck1:true}));

Let me know if this helps.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

View solution in original post

krickard
Level: Powered On

Re: How do you check multiple controls for an entry before moving to the next screen?

Thanks that worked. 

Super User
Super User

Re: How do you check multiple controls for an entry before moving to the next screen?

Glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

Thanks,
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
krickard
Level: Powered On

Re: How do you check multiple controls for an entry before moving to the next screen?

Well... I thought it worked. Maybe I should provide the whole formula.

 

If(!IsBlank(inpAnswer_3.Text) && !IsBlank(inpAnswer_2.Text) && !IsBlank(inpAnswer_3.Text), Navigate(Home, ScreenTransition.Fade,{vcheck1:false}) && /*Submit Question and Answers*/ Patch(QuestionPool,Defaults(QuestionPool),{AssessType: inpAssessment_1.SelectedText.Value,Category: inpCategory_1.SelectedText.Value,Question: inpQuestion_1.Text,A1: inpAnswer_1.Text,A2: inpAnswer_2.Text,A3: inpAnswer_3.Text}), UpdateContext({vcheck1:true}) );

 

It says the Patch section has an invalid argument: expecting Boolean, Number, Text, OptionSetValue. 

 

Can I not add a second command to the true statement like this? 

Super User
Super User

Re: How do you check multiple controls for an entry before moving to the next screen?

Can you try this:

If(!IsBlank(inpAnswer_3.Text) && !IsBlank(inpAnswer_2.Text) && !IsBlank(inpAnswer_3.Text), Navigate(Home, ScreenTransition.Fade,{vcheck1:false}); /*Submit Question and Answers*/ Patch(QuestionPool,Defaults(QuestionPool),{AssessType: inpAssessment_1.SelectedText.Value,Category: inpCategory_1.SelectedText.Value,Question: inpQuestion_1.Text,A1: inpAnswer_1.Text,A2: inpAnswer_2.Text,A3: inpAnswer_3.Text}), UpdateContext({vcheck1:true}) );

Basically replaced && with ;

Let me know if this helps. If not, we might have to look at your Patch formula. Side note: suggest not to use SelectedText. Use the Selected instead.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
krickard
Level: Powered On

Re: How do you check multiple controls for an entry before moving to the next screen?

The ; worked thanks. 

Super User
Super User

Re: How do you check multiple controls for an entry before moving to the next screen?

Awesome! Let me know in case of any more questions!

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,449)