Hi All,
First time posting so hoping I share enough information to make sense of my requirement.
I have a SharePoint List with many columns of Number format. I was able to use HTTP Request to POST the columns on a Loop just increasing a number used within the Title and InternalName, which worked well.
However, the column format now needs to be changed to Choice and I am struggling to use the PATCH or PUT methods to change the type of field, add choices etc. List not yet storing any data.
Image shows how I first attempted this, which works to create with POST method but not update using PATCH.
Please can someone confirm if we are you able to update the existing field properties using the HTTP request or only create new fields (and if so, where I am going wrong)? If I can get the method working, the idea is to increment through iLoop variable for required interval and edit each of the columns, instead of manually changing them.
I've read a few responses from @Expiscornovus and others in this space but nothing that covers updating the properties of the columns in a List rather than the items themselves.
Thanks for any suggestions.
Hi @djwtt
ok understood. I am not sure how to rename the data types? Is it better to create a new one and delete the old column via API?
Thanks
I have cracked it! The Uri also needed to reference the field to change, which I achieved by adding '/getbytitle('Field name here').
Working fine now.
Thanks for quick reply @abm . That's not quite what I am trying to do. I have columns called Q1, Q2, Q3 etc which were set up as Number. I am wanting to change the type from Number to Choice, and define the Choice options.
The idea being that this step would be inside a Do Until loop so I could repeat for each column rather than manually changing them all.
Hi @djwtt
You are trying to rename a text field to Choice data type. That's what I understood. I am not sure this is possible. If you go to list settings in SharePoint and click the text field, you can't rename the field to another data type like choice field.
Thanks
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1