Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Reordering items in gallery



The gallery I inserted does not have the same order of the items in excel as my data source. Instead, it sorted them alphabetically which I do not want, How to reorder the item to match the excel table? 



Super User
Super User

Hi @AdelBishara,


You can use sorting in Gallery


Click on Gallery then items


Sort( Table, Formula [SortOrder ] )


You can refer this site to get clear understanding about Sorting



Please Mark as Answer if it's helpful


Super User
Super User


What is the formula in the Items property of your gallery?  If you don't have an ID column for the Excel table, you should add one and you can sort your gallery based on that column. 

Hi Drrickryp,

The formula is: 

SortByColumns(Search([@var], TextSearchBox1.Text, "Variables","status"), "Variables", If(SortDescending1, Descending, Ascending))


I do not have ID column. There are only two columns with list of variables not including names or ID. 

Super User
Super User


Search([@var], TextSearchBox1.Text, "Variables","status") will not sort your data.  Put this in the Items property of your gallery.

Helpful resources

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,654)