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

Community site session details

Session Id : NqYrFFC3ZBPI7rT4XokOup
Power Automate - General Discussion
Answered

update values of choice column in REST API

Like (1) ShareShare
ReportReport
Posted on 25 Nov 2021 19:00:31 by 73

I'm trying to change the values of a choice field through the REST API of Sharepoint (I'm using Power Automate.

The flow executes without error, but the values don't change.
My library is test1 and the column is Originator.

Any help would be appreciated. Thanks in advance

rolanddaane_0-1637866727875.png

 

  • rolanddaane Profile Picture
    73 on 26 Nov 2021 at 19:09:22
    Re: update values of choice column in REST API

    I got it to work....!! thanks to  
    I needed to change the method to PATCH, and then I can ass the getByTitle('Originator'). see belos.

    It's now working! thanks mate


    rolanddaane_0-1637953631779.png

     

  • rolanddaane Profile Picture
    73 on 26 Nov 2021 at 17:00:25
    Re: update values of choice column in REST API

    I filled in something that looks like a GUID, and I get the following error:
    The parameter __metadata does not exist in method GetById.
    clientRequestId: 8b36b980-75d0-44df-a742-be64da0ad90f
    serviceRequestId: bbf506a0-20cf-3000-5fa3-71252c489668

  • rolanddaane Profile Picture
    73 on 26 Nov 2021 at 16:21:31
    Re: update values of choice column in REST API

    Hi,
    Thanks for this.
    Do you know how I can find the field GUID? I saw that you added it.

    I also noticed that my code creates a new column named Originator (which I didn't know was possible)

    rolanddaane_0-1637943658294.png

     

  • Verified answer
    Expiscornovus Profile Picture
    32,169 Most Valuable Professional on 26 Nov 2021 at 09:41:46
    Re: update values of choice column in REST API

    Hi @rolanddaane,

     

    It looks like you can use a POST request (with MERGE in the header) against the specific field and use define the choices as xml.

     

    I have tested below and that seems to work. Obviously test it first if this works for you as well.

     

    {
     "Accept": "application/json;odata=verbose",
     "Content-Type": "application/json;odata=verbose",
     "X-HTTP-Method": "MERGE"
    }

     

    {"__metadata":{"type":"SP.Field"},"SchemaXml":"<Field ClientSideComponentId='00000000-0000-0000-0000-000000000000' CustomFormatter='' DisplayName='Originator' FillInChoice='FALSE' Format='Dropdown' IsModern='TRUE' Name='Originator' Title='Originator' Type='Choice'><CHOICES><CHOICE>A</CHOICE><CHOICE>B</CHOICE></CHOICES></Field>","Title":"Originator","Description":""}

     

    updatefield_merge.png

     

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete