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
Frequent 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
Frequent 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

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (47,259)