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

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

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

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

Thanks that worked. 

Highlighted

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

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

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

The ; worked thanks. 

Highlighted

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,142)