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

Verify if all the fields in an edit form is filled before submitForm

Dear all,

 

I have a canvas app containing an edit form. I will have an if function to make sure that all columns in the form regardless on required or not are filled before submiting and if not, I will patch the fields to be saved anyway.

is there a way to do that?

 

Thank you so much for your help

Regards

Angela

1 ACCEPTED SOLUTION

Accepted Solutions
Nogueira1306
Super User
Super User

Hey!!!

Try this:

If(
   IsBlank(TextInput1.Text) || IsBlank(TextInput2.Text) || IsBlank(TextInput3.Text) || IsBlank(TextInput4.Text), 
   Notify("NOT ALL FIELDS ARE FILLED"), 
   SubmitForm(Form1)
)

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,

Gonçalo Nogueira

Check my LinkedIn!

Buy me a coffee!

Check my User Group (pt-PT)!

Last Post on Community

My website!

View solution in original post

2 REPLIES 2
Nogueira1306
Super User
Super User

Hey!!!

Try this:

If(
   IsBlank(TextInput1.Text) || IsBlank(TextInput2.Text) || IsBlank(TextInput3.Text) || IsBlank(TextInput4.Text), 
   Notify("NOT ALL FIELDS ARE FILLED"), 
   SubmitForm(Form1)
)

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,

Gonçalo Nogueira

Check my LinkedIn!

Buy me a coffee!

Check my User Group (pt-PT)!

Last Post on Community

My website!

iAm_ManCat
Super User
Super User

If all of the fields must be filled, then technically they are required, so then why don't you change the value for Required for each datacard to true?

That way you don't have to do any code, as the SubmitForm() function will flag anything that's not filled due to the datacards being required 🙂

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,799)