cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
msmith
Level 8

Re: Required Field with Patch Part 2

I got this statement to kind of work. If anyone of the toggles are No it will prompt, but if they are all Yes, it will not advance to the next page. I also need to figure out how to make sure if one is set to No that it will be able to advance as long as the text box has something in it. So basicly the idea is if there are any No's, there should be a reason filled out in the text box as to why.

 

If(DataCardValue91.Selected.Value="No", Set(MyVis,true) || If(DataCardValue92.Selected.Value="No", Set(MyVis,true) || If(DataCardValue93.Selected.Value="No", Set(MyVis,true) || If(DataCardValue94.Selected.Value="No", Set(MyVis,true) || If(DataCardValue12.Selected.Value="No", Set(MyVis,true), NewForm(Form_2);Navigate('Page-2',ScreenTransition.Fade))))))

msmith
Level 8

Re: Required Field with Patch Part 2

Love your videos Shane, but I am looking for low code if possible. I have 12 pages with 10 fields each. I have not had a chance to check out the password screen app, but looking forward to it. 

Super User
Super User

Re: Required Field with Patch Part 2

Hey @msmith I didn't make the video to answer your question (sorry) but I did realize that you are missing one of the tricks of stacking IFs with PowerApps. This video PowerApps If Statement shows you how to do an if statement like this (I am trying to translate your so may not be perfect):

 

If(

DataCardValue91.Selected.Value="No", Set(MyVis,true),

DataCardValue92.Selected.Value="No", Set(MyVis,true),

DataCardValue93.Selected.Value="No", Set(MyVis,true),

DataCardValue94.Selected.Value="No", Set(MyVis,true),

DataCardValue12.Selected.Value="No", Set(MyVis,true),

NewForm(Form_2);Navigate('Page-2',ScreenTransition.Fade)

)

 

I explain how that works in the video but the upside is that is a lot easier to follow once you understand it. Long story short if any of those are "No" then set the variable. If they are all Yes you get to the bottom and create the new form and navigate to the new screen.

 

Hope that helps and makes sense.

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
msmith
Level 8

Re: Required Field with Patch Part 2

That and the video was really helpful. Can you tell my why this statement won't work the if I want to compare two fields, Toggle and Text box. If Toggle = No & TextBox is Blank then Set(MyVis,True)

 

If(DataCardValue91.Selected.Value="No" & (IsBlank(DataCardValue116)), Set(MyVis,true), If(DataCardValue92.Selected.Value="No" & (IsBlank(DataCardValue116)), Set(MyVis,true), If(DataCardValue93.Selected.Value="No" & (IsBlank(DataCardValue116)), Set(MyVis,true),If(DataCardValue94.Selected.Value="No" & (IsBlank(DataCardValue116)), Set(MyVis,true), If(DataCardValue12.Selected.Value="No" & (IsBlank(DataCardValue116)), Set(MyVis,true), NewForm(Form_2);Navigate('Page-2',ScreenTransition.Fade))))))

msmith
Level 8

Re: Required Field with Patch Part 2

Nice I was able to figure this out with the help of both you guys. Thank you!!

 

If(DataCardValue91.Selected.Value="No" && (IsBlank(DataCardValue116)), Set(MyVis,true), If(DataCardValue92.Selected.Value="No" && (IsBlank(DataCardValue116)), Set(MyVis,true), If(DataCardValue93.Selected.Value="No" && (IsBlank(DataCardValue116)), Set(MyVis,true),If(DataCardValue94.Selected.Value="No" && (IsBlank(DataCardValue116)), Set(MyVis,true), If(DataCardValue12.Selected.Value="No" && (IsBlank(DataCardValue116)), Set(MyVis,true), NewForm(Form_2);Navigate('-2',ScreenTransition.Fade))))))

 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,121)