How To Use The Power Apps INDEX Function



Summary

The Power Apps INDEX function returns a row from a table by specifying the row number. For example, we could get the 2nd row of a table by supplying the table name and the number 2.



Syntax
Index(Table, Index)


Arguments
NameRequired?Description
TableYesA table of values.
IndexYesThe row number in the table to be returned. Top row is 1, the next row is 2, then 3, etc.



Examples

The Customers table contains the following names, addresses and cities.


Full NameAddressCity
Matthew Devaney115 Main Street Winnipeg
Sarah Green45 Henderson HighwayBrandon
Kelly Smith34 Portage AvenueSteinbach
David Johnson10 Commerce DriveKenora




To get the 2nd row of the table we can write an INDEX function like this:

Index(Customers, 2)



The result is:

Full NameAddressCity
Sarah Green45 Henderson HighwayBrandon




We can also use the Power Apps INDEX function to get a value from a specific row of the table. To get the Full Name from the 2nd row we can write this code.

Index(Customers, 2).'Full Name'



The result is:

Sarah Green


Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments