cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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
Highlighted
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
Highlighted
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

Highlighted
Helper II
Helper II

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

Thanks that worked. 

Highlighted
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
Highlighted
Helper II
Helper II

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? 

Highlighted
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
Highlighted
Helper II
Helper II

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

The ; worked thanks. 

Highlighted
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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (5,793)