cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
physics515
Level: Powered On

Return the index that contains a specific value?

My current situation:

I have an array, we'll call it "Array1[]". It contains the follow information:

 

[
   "Not the value",
   "Not the value",
   "Not the value",
   "The Value",
   "Not the value"
]

Due to the nature of Array1[], the "The Value" will be in a different index on every run.  What I am trying to figure out is how to find which index "The Value" is in (meaning, in this case, a function that would return "4").

 

I have tried to use filterArray() and got it to filter out all other indexies, is there someway I can use the output from filerArray() to derive the original index?

 

The reason I need this is that future operations will be dependent of relative indexies (e.g. If "The Value" is in Array1[4] then subtract Array1[3] from Array1[6])

 

I hope I explained it thourghly enough.

 

Thank you somuch for your help,

 

Justin Icenhour

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Return the index that contains a specific value?

Hi @physics515,

 

I have made a test on my side, you could refer to screenshot below to create the flow:

Capture.PNG

Capture.PNG

 

The flow would run successfully as below:

Capture.PNG

 

Best regrads,

Alice

View solution in original post

2 REPLIES 2
Highlighted
Community Support Team
Community Support Team

Re: Return the index that contains a specific value?

Hi @physics515,

 

I have made a test on my side, you could refer to screenshot below to create the flow:

Capture.PNG

Capture.PNG

 

The flow would run successfully as below:

Capture.PNG

 

Best regrads,

Alice

View solution in original post

physics515
Level: Powered On

Re: Return the index that contains a specific value?

Thank you so much, perfect solution!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 83 members 5,360 guests
Please welcome our newest community members: