web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sharepoint List with P...
Power Apps
Unanswered

Sharepoint List with Patch missing required fields.

(0) ShareShare
ReportReport
Posted on by 83

I am trying to build an app without using the datacards. So I have multiple inputs, and a patch function to submit them. However, when I try to submit the info I get "Some" errors that are missing because they are required. From 10 required columns when I look at the errors after doing the patch, I only see that 3 of my columns are actually required. When I look at the sharepoint list, the created record shows the newly added record but with warnings over the missing required information. Im not sure if this is an issue of using a sharepoint list that has required fields, but I cant find any information on how to make my inputs required AND for the inputs to actually populate the errors table when they are missing information.

This is how I am looking at the errors table:

UpdateContext({ErrorsContext:Concat(Errors('MyTable'),Message & Char(13) )});

ErrorLabel.Text = ErrorsContext

 

My sharepoint list complains about these fields missing, but the patch didnt show them as errors.... so the update goes thru:

CompleteWithErrors.png

 

Is there any way to make the fields required? or any way to manually add errors to the errors table? or to make sharepoint lists required columns actually be required?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @LuisTorres ,

    What is your Patch code - please send as text.

  • LuisTorres Profile Picture
    83 on at

    this is the code for my submit button:

     

    UpdateContext({ErrorsContext:""});
    Patch('MyTable',Defaults('MyTable'),
    {Title:Now() & " " & User().Email,
    Department:DepartmentInput.Text,
    RequestorName:RequestorNameInput.Text,
    RequestorEmail:RequestorEmailInput.Text,
    RequestorPhone:RequestorPhoneInput.Text,
    Term:TermInput.SelectedText,
    Year:Value(YearInput.Text),
    Subject:SubjectInput.Text
    }
    );
    UpdateContext({ErrorsContext:Concat(Errors('Admin-CourseAdd'),Message & Char(13) )});

  • LuisTorres Profile Picture
    83 on at

    After more experimentation it seems that required texts are not being picked up by the patch function, only numbers or multi selections bounce with the error. This is weird.

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @LuisTorres ,

    One thing I would try first is turning Now() to text 

    Text(Now(),ShortDate) & " " & User().Email

    The rest as you have said does not make a lot of sense presently as text should simply patch if the destination fields are also text.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

  • TheRobRush Profile Picture
    11,128 Moderator on at

    I don't know how your particular app is behaving, BUT sometimes the patch functions drops errors because the record in Sharepoint you are updating to has blank columns. This can be corrected by using a updateif, instead of patch, on the blank cells in the record

  • LuisTorres Profile Picture
    83 on at

    I havent seen the updateif function, I am only creating new records tho, so im not sure if it would have what im looking for.
    For now I have been manually checking the required fields, and adding the errors manually to the errors table. This is working so far, however Im just curious as to why the sharepoint list with patch ignores the required text fields.

  • TheRobRush Profile Picture
    11,128 Moderator on at
    Ok so after rereading original question and your responses, I am getting that you would like powerapps to not allow a user to submit until all the required fields have been filled out (correct me if thats not it) if so, what i usually do for this myself is just to set displaymode of the submission button to only switch to edit mode if all required fields have been input through a combination of isempty/isblank depending on each control type. That might help you as it doesnt require a check of column req status you hardcode the reqs on app side
  • LuisTorres Profile Picture
    83 on at

    that is correct @TheRobRush  however disabling buttons without any sort of notification is horrible for accessibility, I really need the errors to be shown to the user. For me its weird that even after I declare the fields as required text, the patch function can insert a record without the required text missing... this only happens with text fields, any other data type for sharepoint lists works as intended except text fields.

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @LuisTorres ,

    I will bow out of this and leave you in the capable hands of @TheRobRush 

  • TheRobRush Profile Picture
    11,128 Moderator on at
    Have you considered, if you would like to show your users the errors, attaching an if statement to your submit button? Something like below should work

    If(or(isblank(a),isblank(b) etc),set(errorview,true),patch)

    Then have a small label below each required input that in visibility says errorview
    And in text says if(isblank(a),"Required Field","")

    That could circumvent the req for checking in sp first

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard