I need to provide a solution for a business request,
There is a Sharepoint List that already has more than 400 items; one of the fields on the list is a drop-down field with multiple-choice options, called clients. I need to rename one of the values in the drop-down list due to a Client name change,
For instance, in the test list, I need to rename "Client C" to the new name "Client CC" and keep all the other values intact.
The flow gets the items from the list with filter query on the "Client C"
I am facing an issue when I want to update the list item, it removes all other clients as well
Any help is much appreciated
Yes, I think this would be possible if you would collect the existing values from the Get items query and replace it.
Below is an example of that approach.
In this example I have added the new Client CC name as a separate option in the Clients Column.
The whole flow would look like below. In the Get items I am still using the filter query you were using.
1. After the Get Items I have placed a filter array. The filter array uses the clients field. Which will force the action to be placed in a loop. I am excluding the Client C, because we don't want to update the item with that old value.
2. Add a Select action. This is to only select the labels of the select choice options. It is using the body of the filter array and in the map it using the value column:
3. Add a Send an HTTP request action to update each item via the validateUpdateListitem method. It uses the ID field to update the correct list item.
In the body it is using the following expression to collect the old choice values and add the end we are adding the new Client CC value.
Hi @Expiscornovus , Thank you so much for taking the time and replying to my question, I am facing an issue on my end, when I add the filter array step, the flow starts a apply to each loop ( which makes sense)
buy as soon as I add clients value in starts a new apply to each loop
Can you remove the apply to each and the filter array actions? When you start over please add the filter array and add the Clients field in the from field first. When you add it in that order that should avoid another loop. After that you can add the Clients value field in the filter part.
I started a new flow and it`s the same reaction, as soon as I select the Client value it starts a new loop 😞
added clients to the from the field and the first loop started
selecting Clients value here
as soon as I click on client value the new loop starts
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.