May 15 2017 04:07 AM
I'm experimenting with Graph (Beta) with Sharepoint. I can create items and update their fields. It works for simple fields like text andnumbers. Howerver, I can't figure out how to update fields like lookup and the one with multiple values.
If I read an item and look at a lookup field, it looks like this:
"Predecessors": [
{
"LookupId": 80,
"LookupValue": "Create general slides masters"
}
]
If I do the same format (but only the LookupId portion) with a PATCH request and the right url, it gives e malformed request.
Anyone knows how to form the request for these more complex types?
Etienne Fortin
Aug 08 2017 02:03 AM
I am now faced with the same task, did you figure out how to do it?
Aug 21 2017 05:11 AM
Unfortunetely not. Can't figure out how to do it.
Aug 21 2017 07:04 AM
Aug 21 2017 08:13 AM
I'm not sure I understand. Can you put out a json quick exemple of the PATCH http request that would follow what you are suggesting?
Aug 21 2017 08:24 AM
Aug 21 2017 08:29 AM
Yes, I did. I used "Id", and "ID". No success. I used the field name for the value field, without the Id suffix.
Aug 22 2017 07:53 AM
Too bad :(
But are you successfully calling the view-items endpoint:
/beta/sites/{site-id}/lists/{list-id}/items
and getting a non-null response?
Because all I get as a response is:
{ "@odata.context": "https://graph.microsoft.com/beta/...", "value": [] }
Sep 06 2017 07:24 AM
Did you find an answer yet? Having the same issue, only when creating an item instead of updating
Sep 06 2017 07:26 AM
I'm getting a non null response to my queries.
Sep 06 2017 07:26 AM
No I didn't.
But you mention being able to update a lookup item? How do you proceed? How did you make it work. I can't update either.
Sep 06 2017 07:31 AM
Mar 27 2019 03:29 AM
@Etienne Fortin The key is to append "LookupId" to the column name. So if the lookup column name is "Predecessors", then insert the following JSON:
"PredecessorsLookupId": 80,
Jan 25 2021 06:30 AM
@Etienne Fortin Have you found a solution to this issue? I am experiencing the same problem.
Mar 13 2021 05:36 AM