web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Return the index that ...
Power Automate
Unanswered

Return the index that contains a specific value?

(0) ShareShare
ReportReport
Posted on by 19

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

Categories:
I have the same question (0)
  • Verified answer
    v-yuazh-msft Profile Picture
    on at
    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

  • physics515 Profile Picture
    19 on at
    Re: Return the index that contains a specific value?

    Thank you so much, perfect solution!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard