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 / List of Files - how do...
Power Automate
Answered

List of Files - how do I reference an Index?

(0) ShareShare
ReportReport
Posted on by 4

Hi all,

 

May I get some help on to locating an index from a list of files please?
I looked up online and used the %Files[0]% expression.

 

It didn't work for me.

I have tried Files.Fullname but all in vein.

 

I think there must be an update on syntax and thus all the previous expressions are invalid.

 

Marco_Cheung_0-1708603053826.png

Marco_Cheung_1-1708603076169.png

Regards,

Marco

I have the same question (0)
  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    %Files[0]% would work if you did not have Power Fx enabled on your flow as you created it.

     

    If you want traditional syntax to work and don't need Power Fx, create a new flow and disable the toggle when starting: 

    enabling_power_fx.png

    If you want to keep using Power Fx, the correct syntax to get an item in an array based on an index would be to use the Index() expression.

     

    So, for example, the following expression will return the first file in your list: =Index(Files,1)

     

    Please note that the index in this expression is 1-based as opposed to the traditional indexing in PAD, where you would use a 0-based index. So, the first item is actually at index 1.

     

    See here for more reference on the expression: https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-first-last 

  • Marco_Cheung Profile Picture
    4 on at

    that works, Power FX is confusing as most of the guides available are not Power FX content. Thank you Agnius!

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 248 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 160 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 142 Super User 2026 Season 2

Last 30 days Overall leaderboard