Skip to content

Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Problems
  • Triggers
  • Application specific solutions
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Resources
Menu

Add new choice to a SharePoint choice field with Power Automate

Posted on March 27, 2022March 27, 2022 by Tom

“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!

Power Automate add new choice SharePoint

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.

Power Automate add new choice SharePoint

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.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Now available:

The Ultimate Power Automate expressions cheat sheet
Equip yourself with the tool to translate your thoughts into Power Automate expressions!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Hello and welcome!

My name is Tom and I'm a business process automation consultant and Microsoft MVP living in the Czech Republic. I’ve been working with Microsoft technologies for almost 10 years, currently using mainly Power Automate, SharePoint, Teams, and the other M365 tools.

I believe that everyone can automate part of their work with the Power Automate platform. You can achieve a lot by "clicking" the flows in the designer, but you can achieve much more if you add a bit of coding knowledge. And that's what this blog is about.

To make the step from no-code Power Automate flows to low-code flows: using basic coding knowledge to build more complex yet more efficient flows to automate more of your daily tasks.

  • Format results of date calculation in SharePoint columnJune 29, 2022
  • Why is your Power Automate flow creating duplicatesJune 26, 2022
  • How to create a unique identifier in your Power Automate flowJune 22, 2022
  • How to assign custom SharePoint permission level with Power AutomateJune 19, 2022
  • Remove permissions from a specific SharePoint user with Power AutomateJune 15, 2022

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

© 2022 Let's POWER Automate | Powered by Superbs Personal Blog theme