cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Check if an item exists in array

Hi I am trying to Build a flow, in part of the flow I need to check if an item exists in an array. Is it possible to do this?

my only problem is to check if exist in the array

the following shows my workflow:

2019-03-12_12-18-09.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Check if an item exists in array

Hi @EhsanAliverdi ,

 

To check if an item exists in an array, please check the following flow for a reference.

 

In my scenario, I am going to check if a button input exists in an array. If Yes, do nothing. If no, add the item to the list.

1.PNG2.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
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
Highlighted
Community Support
Community Support

Re: Check if an item exists in array

Hi @EhsanAliverdi ,

 

To check if an item exists in an array, please check the following flow for a reference.

 

In my scenario, I am going to check if a button input exists in an array. If Yes, do nothing. If no, add the item to the list.

1.PNG2.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
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

Highlighted
Resolver I
Resolver I

Re: Check if an item exists in array

Hi. I have a question  about what might be the most efficient way to check whether a value exists in an array. Two straighforward approaches, it seems are these:

  • Loop through the collection and check each element, either setting a flag (e.g. blnValueFound = true), or concatenate the values and check the string (as above).
  • Apply a filter to the collection and then check whether it's empty.

Does anyone know which is the best approach in terms of speed and resources?

 

Thanks.

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (4,331)