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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 412

#2
Vish WR Profile Picture

Vish WR 305

#3
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

Last 30 days Overall leaderboard