cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ariser
Regular Visitor

Unique ID for a flow instance

I'm going to write data into a sharepoint list and read it again later from the same list.

 

However I want to avoid the problem, that two instances of my flow could interfer by accessing the same list items. So my idea is, to write a unique ID into a column of  that list and filter for it when re-reading the data. So, where to get a unique ID?

 

In my opinion the best option was to use something connected to the flow instance. I know there's a ID for the flow, but is there an identifier for the instance as well? And if so, where do I get it?

 

Other option is to use a timestamp but in rare cases this timestamp won't be unique as well. Other ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
happyume
Regular Visitor

Hi,

 

To get a unique id, you can use one of the expression below:

 

unique id of flow:  workflow()?['name']

 

unique id of flow run: workflow()?['run']?['name']

 

bonus: 

flow name: workflow()?['tags']?['flowDisplayName']

 

--

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
happyume
Regular Visitor

Hi,

 

To get a unique id, you can use one of the expression below:

 

unique id of flow:  workflow()?['name']

 

unique id of flow run: workflow()?['run']?['name']

 

bonus: 

flow name: workflow()?['tags']?['flowDisplayName']

 

--

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Works like a charm! Is there an overview over all the properties of workflow()?

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (11,991)