“Is there a way to add a new choice to SharePoint choice field with Power Automate, to keep the existing choices and add a new one?”
There’s already a blog post on updating available choices in a SharePoint choice column, but that solution expects all the choices as the input. You create an array with all the new choices, and replace them in the column settings. But what if it’s not the same list of choices every time? If you want to take the existing choices, and just add a new one?
This post will show you how to get the existing choices for the update.
Get the choices with an HTTP request
Since you’re extracting data from the column settings, you’ll have to use an HTTP request. The request below will load all the fields in the given list, and filter only the one with the defined name.
Method: POST
Uri:
_api/web/lists/GetByTitle('<listName>')/fields?$filter=EntityPropertyName eq '<columnInternalName>'
Note: <…> are placeholders, replace them including the < and >. Always use the column internal name in the filter!
The result you’ll get is that column with all its settings, including the available choices.
Extract the choices navigating the result JSON and store them in an array variable. The expression to extract them can look as below:
body('Send_an_HTTP_request_to_SharePoint')?['d']?['results'][0]?['Choices']?['results']
Add the new choice to the existing choices with the ‘Append to array variable’ action.
All that’s left is to call the HTTP request to update the column with the variable as the available choices.
Summary
Knowing the right HTTP request in your Power Automate flow you can not only replace the choices in the SharePoint choice column, you can also extract the current ones before you add a new one. That gives you more flexibility as you don’t need to know all of them. You can just keep adding to the existing ones.
This soultion only partially work.
Indeed you can add an additional choice, but using the method above, you will only be able to see the new choice in the “Column edit” mode.
The user who is going to input the data in “Grid Edit” model will not see the new choice.