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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Is it possible to sele...
Power Apps
Unanswered

Is it possible to select specific item from an array or collection? (with the help of index)

(0) ShareShare
ReportReport
Posted on by 99

I have for example this:

First ( First( First(allData).input ).myData ).Value

 

and I get 10 items which is totally fine. But I would like to select just the 5th item , how can I do it?

I tried something like this

First ( First( First(allData).input ).myData ).Value[4] or so but does not work....

 

any help? Is it possible this  what I am trying?

 

Categories:
I have the same question (0)
  • Verified answer
    Meneghino Profile Picture
    6,949 on at

    To select the 5th item of MyTable then use:

    Last(FirstN(MyTable, 5))

     

    This means that you probably need:

    Last(FirstN( First( First(allData).input ).myData , 5))

  • mob Profile Picture
    99 on at

    tnx!!  it works, but it's kind of hack... i mean there is no solution to "declare index of items" e.g.[4].

     

    here you select 1,2,3,4,5 and then last which is 5

     

    anyway tnx, it works perfectly!

  • Meneghino Profile Picture
    6,949 on at

    You are welcome.  Yes, it is kind of a hack and also be careful because if there are less than 5 items then you will probably be returned the last in any case.  So you may need an If(CountRows(MyTable)>=5, ) to wrap around your statement.

     

    I have learned quite a few hacks for PowerApps over the last couple of months...

  • LUNA24 Profile Picture
    98 on at
  • LUNA24 Profile Picture
    98 on at
  • LUNA24 Profile Picture
    98 on at
  • LUNA24 Profile Picture
    98 on at
  • LUNA24 Profile Picture
    98 on at
  • LUNA24 Profile Picture
    98 on at
  • LUNA24 Profile Picture
    98 on at

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard