cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ursNani
Advocate II
Advocate II

Validate fields before submitting form

Hi,

I am building a app, That need to Validate fields before submit .

I have already one validation code as below  . but need to add one more validation 

If((DataCardValue7.Selected.Value="Yes"&&CountRows(DataCardValue8.Attachments)>0) || DataCardValue7.Selected.Value="No",SubmitForm(NewForm));

 

I have DataCardValue3 (Dropdown) and DataCardValue4 (text input) 

Form Should Be submit after DataCardValue3 (Dropdown) Or  DataCardValue4 (text input)  one of field is filled . 
already same function is there as given function above . 
please help me with code so form validate two more fields 

Thank you 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @ursNani ,

 

You could try this:

If(
And(
(DataCardValue7.Selected.Value="Yes"&&CountRows(DataCardValue8.Attachments)>0) || DataCardValue7.Selected.Value="No",
Or(!IsBlank(DataCardValue3.Selected.<ColumnName>),!IsBlank(DataCardValue4.Text))
)
,SubmitForm(NewForm));

 

Best Regards,

Wearsky

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi @ursNani ,

 

You could try this:

If(
And(
(DataCardValue7.Selected.Value="Yes"&&CountRows(DataCardValue8.Attachments)>0) || DataCardValue7.Selected.Value="No",
Or(!IsBlank(DataCardValue3.Selected.<ColumnName>),!IsBlank(DataCardValue4.Text))
)
,SubmitForm(NewForm));

 

Best Regards,

Wearsky

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,301)