Renaming flows run from Power Apps

As we all know using Power Apps in combinations with Power Automate to run flows is a real winner. You can call a Flow to do all the complicated stuff while you keep your code in Power Apps simple and easy to understand.

Yesterday however I came across a bit of strange behaviour.

I started by create version 1 of my Flow

Then I run my flow from a button

Then I rename my flow to V2 Flow

Even though I renamed the flow my flow will still run when I click the button. This is probably quite good as you might not want all your apps to break

To clean things up I then readd my flow and now the code will show V2Flow.Run() instead of V1Flow.Run(). Ok So far so good.

When I look at the connections everything seems to be fine:

Now I’m exporting my app

And I’m importing my app again

But as a I rename my flow the connection is showing up a bit weirdly. There seems to be a Display name and a run name for a flow.

This is different behaviour for if you have imported the Powerapp or if you have just created a Powerapp.

So what does this mean?

Now that I’ve updated my Flow name the code looks like it is still running v2 of my flow where actually v3 is called. This will make the code potentially confusing. You can of course update all occurrences of the flows but this is quite a painful process if you end up with larger apps having many flows started from the app.

So what should we do?

Try to avoid changing flow names is the better approach.  Try to avoid flow names that have version numbers. And the same of course for names that are different between environments. I often see flows being names something like MyFlow_DEV_v21. Just call it MyFlow and keep track of your versions in a different way.

 

 

 

 

 

 

 

Advertisements

One thought on “Renaming flows run from Power Apps

  1. Having worked with most of the workflow solutions since Staffware was released in 1985, the lack of any proper versioning/publishing of flow definitions is staggering for an ‘Enterprise ready’ product. How difficult would it be to apply similar SharePoint checkin/out minor/major versioning functionality to the flow XML definition? The fact you can only ever work on the ‘live’ version is ridiculous, Save As is NOT the answer!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.