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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Server Error on Patch
Power Apps
Answered

Server Error on Patch

(0) ShareShare
ReportReport
Posted on by 5,331 Moderator

I am getting the following error all of a sudden when I Patch data to the server. There are actually two patches in the condition; one sends data to the List the other send the document to the Library. The Library patch is working fine.

I am only getting the error to the List. It wasn't happening a week ago.

 

When I click in 'OnSelect' to check the error the entire patch is RED. Once I click out all the error goes away.

However, if I try to submit another same thing all over again.

 

Error:
          The requested operation in invalid. Server Response: List failed: The string was not recognized as a valid DateTime.

          There is an unknown word starting at index 1. Client…..

Categories:
  • zmorek Profile Picture
    3,272 on at

    Can you share your patch statement?

  • Phineas Profile Picture
    5,331 Moderator on at

    It's a little lengthy, but here's the meat of it. Since the error keeps calling out a date/time issue I made sure to include all the data fields are a minimum. Seems this didn't starting happening until I added a DueDate field in the Power Apps Gallery that tallies the date due for the next based on the date entered into the 'Date of Award'.

    Both fields are DatePickers (with the DueDate being auto-populated), and are date fields in the List.

    Submit Button 'OnSelect':

         Patch('List',
                 {    Title: Title.Text,
                 YrofCert: Value(YearofCert.Text). - This is a TextInput Field that pull the year from the 'DateOfCQ'

                 DateOfCQ: Value(DateOfCQ.SelectedDate), - This is a DatePicker with " " in the default, but the date is                                                                                             never blank

                                                        
                 DueDate: Value(DueDate.SelectedDate),       - A DatePicker with a calculation in the Default. I've confimed                                                                                        with a label that the calcution works and populates the

                                                                                          correct date
                 LastEdit: Value(LastEdit.SelectedDate)           - A DatePicker with Today() in the Default property.

    }

    );

                 

  • BCLS776 Profile Picture
    8,994 Moderator on at

    There is a period at the end of this statement: YrofCert: Value(YearofCert.Text).

     

    Is that the current syntax for your region? I would have expected a comma.

     

    Edit: In addition, Patch() requires three arguments unless you are merging records

  • Phineas Profile Picture
    5,331 Moderator on at

    I apologize; that was my fat fingers. 

     

    There is no '.' at the end of DteOfCQ in the actual formula.

     

    Here is the Patch...

     

    Patch Error.JPG

  • BCLS776 Profile Picture
    8,994 Moderator on at

    Is the error mentioning something about Patch() has two arguments, but three expected? If not, please share the error message.

  • Phineas Profile Picture
    5,331 Moderator on at

     

    When I click in 'OnSelect' to check the error the entire patch is RED. Once I click out of the Gallry the error goes away.

     

    Error:
              "The requested operation in invalid. Server Response: List failed: The string was not recognized as a valid

              DateTime. There is an unknown word starting at index 1. Client….."

  • zmorek Profile Picture
    3,272 on at

    If you remove the Value() from each of the datepicker fields, does the patch work? Does it work with DateValue()?

  • Phineas Profile Picture
    5,331 Moderator on at

    Tried it eight ways from Sunday yesterday. Every configuration kicked back the same error.

    However, I got up this morning. Rebooted everything, got the 'new schema and variable' message on start. Approved the update, tried to load several documents, everything worked fine.

    Something happened overnite (some form of change or update), and now the error is gone.

    I'm monitoring the situation.

  • Verified answer
    WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    @Phineas ,

    @zmorek is correct on the Value() around the data picker not being required (it is already a date), but if you are patching a new record here, you need the Defaults() syntax (which is what @BCLS776 was alluding to)

    Patch(
     'Member List and Qualifications',
     Defaults('Member List and Qualifications'),
     {
     Title: . . . .
     }
    )

     

    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.

  • Phineas Profile Picture
    5,331 Moderator on at

    I understand now; thank you for the clarification.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard