cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EhsanAliverdi
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
v-yamao-msft
Community Support
Community Support

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
v-yamao-msft
Community Support
Community Support

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

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,254)