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 / Patch error "missing r...
Power Apps
Answered

Patch error "missing required field" for field that doesn't exist

(0) ShareShare
ReportReport
Posted on by 17

Hi,

 

My Patch() function is throwing an error "lhci: Field 'lhci' is required.".

 

Screenshot (edit):

 

Screen Shot 2020-05-26 at 12.47.33 pm.png

 

Screenshot (published app):

Screen Shot 2020-05-26 at 1.03.20 pm.png

I have no clue what "lhci" is. Tried searching online but can't find anything.

 

These are the columns for the SharePoint list:

Screen Shot 2020-05-26 at 12.48.19 pm.png

 

Doesn't turn up under the SharePoint view options either

Screen Shot 2020-05-26 at 12.58.01 pm.png

 

The only other place I can see it referenced is using the REST API to pull the items on the list with ?expand=fields, the field looks like a user lookup field, "lhciLookupId".

 

...,
"fields": {
 "@odata.etag": "\"3648565f-6a0f-43b7-8cd5-2628db6abc0f,7\"",
 "Title": ".",
 "lhciLookupId": "6",
 "OvertimeType": "Overtime (paid)",
 "OvertimeDate": "2020-05-10T14:00:00Z",
 "ApprovedByLookupId": "22",
 "Break": 30.0,
 "OvertimeDateNumber": 20200511.0,
 "StartTime": "2020-05-11T08:00:00Z",
 "EndTime": "2020-05-11T09:00:00Z",
 "IsDeleted": false,
 "Status": "ConfirmedAndApproved",
 "id": "30",
 "ContentType": "Item",
 "Modified": "2020-05-20T05:58:26Z",
 "Created": "2020-05-11T06:54:24Z",
 "AuthorLookupId": "6",
 "EditorLookupId": "6",
 "_UIVersionString": "1.0",
 "Attachments": false,
 "Edit": "",
 "LinkTitleNoMenu": ".",
 "LinkTitle": ".",
 "ItemChildCount": "0",
 "FolderChildCount": "0",
 "_ComplianceFlags": "",
 "_ComplianceTag": "",
 "_ComplianceTagWrittenTime": "",
 "_ComplianceTagUserId": ""
 }
}

 

 

Other notes:

- I can create a new record in Sharepoint without errors.

- This happens in both the editor and using the app when it's published under different users

 

I've tried:

- closing down the app editor (Chrome, Mac).

- removing all Sharepoint connections and re-adding them

 

At a loss. Any help appreciated.

 

Cheers,

John

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

    Hi @jrmarquard ,

    Might be a wild guess here, but SharePoint retains the name the field was originally created with, even after you change it. Try removing all the required fields and see if it works. If do, hover over each on and look at the string on the bottom of the screen and at the end you will see the "internal" name.

     

    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.

  • Verified answer
    v-siky-msft Profile Picture
    on at

    Hi @jrmarquard ,

     

    After a simple comparison, you can see that lhci is most likely the Employee column. The Person column is also LookUp type in some sense, and the lookupid of lhic, Author and Eidtor are all 6, that means they are all the same person, which can confirm our assumption in a further step.

    Snipaste_2020-05-26_15-11-11.png

    As @WarrenBelz mentioned, SharePoint prefers the initial column name, although you have renamed the column name, but in Web API and Power Apps, it still applies the initial column name.

     

    Please go to check if the required Employee column misses in your Patch function?

    Hope this helps.
    Sik

     

  • jrmarquard Profile Picture
    17 on at

    @v-siky-msft @WarrenBelz On the money - big thanks for your help.  Employee column was missing. Adding

    "Employee": { ... etc }

    to my Patch() fixed the issue.

     

    Cheers!!

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

    Thanks @jrmarquard ,

    You can choose to accept more than one response - totally up to you.

  • jrmarquard Profile Picture
    17 on at

    Done! Hadn't realised

  • Terminals_DEV Profile Picture
    9 on at

    warren u frkn legend u saved me after 2 hours of trying to figure out what the hell is going on.

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard