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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get IndexOf String Fro...
Power Automate
Unanswered

Get IndexOf String From Array

(1) ShareShare
ReportReport
Posted on by 2

Hi,
i have an array of Approvers is [

"Pending at CFO",

"Pending at CIO",

"Pending at CMO",

"Pending at CRO",

"Pending at CEO"

]

and string variable of VarCurrent it is value is "Pending at CIO".

how can i find the indexof string variable in an array 
i have tried like these indexOf(variables('VarApprovers'),variables('VarStatus'))

but im getting error.

can you please help me on these

I have the same question (0)
  • NsL Coder Profile Picture
    475 Moderator on at
    indexOf expression only works on string, not array.
     
    not sure why you need to know the "index in array" of an array item, but the only way is likely using apply to each loop and then condition on the item = VarCurrent, if yes, record the iteration indexes

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard