Update of Text Field In SharePoint List Using Rest Returns Error Code of 400

g h 716 Reputation points
2021-01-13T06:29:16.237+00:00

I have a SharePoint list called "Search Results" There is a field in the list called "Users" which I am trying to set to the value "Test" for a specific record ID.

56057-snipaste-2021-01-13-14-28-06.png

I get error code of 400 returned.

Any suggestions on what I am doing wrong or how to proceed with troubleshooting?

Thanks in advance.

Microsoft 365 and Office | SharePoint Server | Development
0 comments No comments
{count} votes

Accepted answer
  1. ZhengyuGuo 10,586 Reputation points Moderator
    2021-01-14T02:35:50.703+00:00

    Hi @g h ,

    If there is space in List Name "Search Results", then the type shoule like this:

    var item = {  
                    "__metadata": { "type":  "SP.Data.Search_x0020_ResultsListItem" },  
                    "Users":  "Test"  
                  };  
    

    Thanks
    Best Regards


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.