cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ahhollan
Post Patron
Post Patron

Required field issue

i have a form tied to a SharePoint list. There are several fields that are required on the form where the fields aren't required in SharePoint. The form will submit and create a new record without values in the required fields. Is there anyway to fix this without making my fields required in SharePoint?  I have several conditional required fields that I don't want to have to change in SP.

 

thanks.

4 REPLIES 4
mdevaney
Super User
Super User

@ahhollan 

My solution would be to not allow the user to submit the form if the required field is not filled in.  Try code like this in the DisplayMode property of the button.

 

If(TextInput_Required=Blank(), DisplayMode.Disabled, DisplayMode.Edit)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

Pstork1
Dual Super User
Dual Super User

I normally do this by disabling the Submit button until the required fields are filled in.  The easiest way to do that is to use an IF() formula in the display Mode property of the button to test whether any of the fields are empty.  If you have more than 3 fields then I switch to setting the OnChange property of each field to increment a variable if its filled in and decrement it if its empty.  Then test that value to set the button to disabled if the number is not equal to or greater than the number of fields.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@mdevaney 's fingers are faster than mine, but I provided a bit more detail.  Between the two you should be able to do what you want.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Can you provide sample formulas for the second method? I think that is the one that I need to use.

 

Thanks.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,041)