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 Automate
Answered

List variable syntax

(0) ShareShare
ReportReport
Posted on by 27

Hi,

 

I recently tried to dynamically access a list element within a loop (i don't want a for each loop, just specific indexes).

 

I've tried %mylist[%myIndex%]% with %myIndex% = 1 but it doesn't work. Same for %mylist[%'myIndex'%]%. However, %mylist[1]% works perfectly fine.

 

Is it possible to use a variable as a list index parameter?

 

Thanks

I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @PBrt 

    The correct syntax is indeed %mylist[variable]%

    Problem is, the way you inform the variable, it's considered as text type instead of value type. 

    Before throw your variable in %mylist[variable]%, try using 'Convert text to number' to convert your variable in number.

    See Solved: Desktop - Extract specific row and column values f... - Power Platform Community (microsoft.com)

  • Riyaz_riz11 Profile Picture
    4,150 Super User 2026 Season 1 on at

    Hi @PBrt 

     

    I think u r mentioned variable way is

    incorrect ,correct syntax is %mylist[variable]%

     

    Regards

    Ahammad Riyaz

     

     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 1,005

#2
Valantis Profile Picture

Valantis 825

#3
Haque Profile Picture

Haque 619

Last 30 days Overall leaderboard