This article is using a test data because using customer data is wrong. The rest is very practical stuff. If you don’t use Dataflow for Power Apps still I think you should.
I am trying to solve a typical problem. We’ve got a Choice column Business Type for Account (for example). We need to remove one of the choice items “Re-seller” from the Choice but first we need update all related records using this item.

This is the Choice we use as an example below:

The “Re-seller” has to be removed. We need its value so we look it up to remember.

We also need the Choice item which will be replacing “Re-seller”. In our case it’s “Vendor”.

You will need a Key for Account. I’ve chosen Account Name, in real life you can use Account Number or Code or anything which is unique column for your table in your organisation.

On the maker portal under Data select Dataflow. We will be creating a new one.

We need a Web API query only retrieving Account records with the Business Type we are trying to replace.
So to make it easy we use my favorite tool, https://www.xrmtoolbox.com/plugins/Cinteros.Xrm.FetchXmlBuilder/ If you want to use any other tool or just create it manually you can do it as well.


My query looks like this one below.

https://<your_org>.crm6.dynamics.com/api/data/v9.1/accounts?$filter=(businesstypecode%20eq%203)
In the Dataflow we will use Web API connected to CDS as a datasource.
Copy to URL you constructed in FetchXmlBuilder in the Connection setting.

Sign in with your account.
Follow the steps I described in the article here to get to the stage below:https://wordpress.com/post/msolenacrm.blog/1580
There are only 2 records because it’s a test data. It could be 100002 and it would make a perfect sense then.

Let’s add a conditional column:


Now we can move to mappings. The Destination table will be Account. We only have to map 2 columns: Name and Business Type.

It’s very important to set the Name in the mapping because this field we use for the unique key.

Map Account Business Type to the conditional column we created. Click Next.

This is the result below:

There are no “Re-seller” columns left in the system so after checking any other dependencies you can safely remove it from your Choice field.
Is there a way of passing in a parameter to a Data Flow?
My use case is similar to this article. I’m building an app/interface to allow users to edit option set values without requiring a code release. Obviously deleting is the most fun as there may be records out there using that option set value. My plan was to (in Power Automate) to list all records using that value and then edit them in some way; to do this via Data Flows I would need to pass in the before and after values for those rows – is this doable or do I stick with updating records in the Flow?
I am looking for an excuse to try out Data Flows !
LikeLike
Hi illuminocity, not sure how complex is your system but it’s usually more than just records using these values. You may have business rules, old classic workflows, scripts, Flows referring to it. For the list of values that change often, it’s recommended to use lookups instead. However, I understand you may have your reasons to design it this way. Currently, there is no OTB way to pass parameters however, you can pass it via updating some, let’s say, custom Table Dataflow Parameters which you will update in the Flow which you trigger to refresh dataflow. Dataflow will retrieve the info you just updated via one of the queries. Let me know if it makes sense.
LikeLike