cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DAVIDPOWELL
Post Prodigy
Post Prodigy

checking for required fields based on previous question

I'm trying to capture required fields. That have to be filled in.

 

Trying to get my IF statement to work.


I'm having trouble with required fields based on a previous selection.
i.e.

2a_txt_OpportunityAmount cant be blank.
IF 2a_txt_OpportunityAmount is answered "yes"


2b_txt_OpportunityAmount must be filled in also


If(IsBlank('1a_drop_CustomerName'.Selected.Value),Notify("The Federal/Public Sector Government Customer is a required field",Error)
,IsBlank('1b_drop_Corporate_Account'.Selected.Value),Notify("The Corporate Account is a required field",Error)
,IsBlank('2a_txt_OpportunityAmount'.Text),Notify("The Product Amount is a required field.",Error)


,UpdateContext({showDialog:true})
)
;

 

Thanks

Dave

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @DAVIDPOWELL try 

 

If(And(2a_txt_OpportunityAmount.Text="yes",!IsBlank(2b_txt_OpportunityAmount.Text)),true) for 

2a_txt_OpportunityAmount cant be blank.
IF 2a_txt_OpportunityAmount is answered "yes"

2b_txt_OpportunityAmount must be filled in also

 

Further consider changing to a Switch statement

 

Hope this helps

 

View solution in original post

1 REPLY 1
rubin_boer
Super User
Super User

hi @DAVIDPOWELL try 

 

If(And(2a_txt_OpportunityAmount.Text="yes",!IsBlank(2b_txt_OpportunityAmount.Text)),true) for 

2a_txt_OpportunityAmount cant be blank.
IF 2a_txt_OpportunityAmount is answered "yes"

2b_txt_OpportunityAmount must be filled in also

 

Further consider changing to a Switch statement

 

Hope this helps

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PWREduCon768x460.png

Join us at PWR EduCon - A Power Platform Conference

Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!

Top Solution Authors
Top Kudoed Authors
Users online (3,148)