Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Check array values and return the index of specific value

(0) ShareShare
ReportReport
Posted on by 36

Hi, 

Can anyone please help me with this? 

 

I'm trying to check an array in Power Automate whether it has a number or not, and return its index. The array is received from powerapps as a string and the number of elements is not fixed, but it could have one numeric value. 

 

some examples of the arrays the flow might receive from powerspps

["","","200",""]

["","",""]

["","400",""].

 

 

The flow I need to make should check first if the array has a numeric value or not, and if it does, the flow should return its index and a variable. 

 

any thoughts? 

 

  • Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: Check array values and return the index of specific value

    Hello @OmarSaleh 

     

    This is what the flow could look like:

     

    Matthy79_1-1703359513778.png

     

    1. Use json function to transform your parameter into an array.
    2. Use select to create your index. index = item() and value = 
      outputs('Compose_string_array')[item()]
    3. Use filter array to only get those elements that has a numeric value
    4. Respond to your app using this formulas:
      if(empty(body('Filter_index')), false, true)
      coalesce(first(body('Filter_index'))?['value'], -1)

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1