Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Sort/Search issues with lookup column from Sharepoint List

I'm new to Power Apps and have spent too many hours trying to figure this out and need some help. I've created 3 apps: Project Establishment, Set Project Milestones and Project Status that are connected to Sharepoint Lists. Someone will establish a Project in Project Establishment, selecting a site and a program (along with a few other fields). The Site and Program are then combined to create a unique Site Program column to differentiate between projects. I've got sort and search working in this apps BrowseScreen's Gallery. I use the below formula to do the sorting on the gallery.


SortByColumns(Filter('Project Establishment', StartsWith(Site_x0020_Program, TextSearchBox1.Text)), "Site_x0020_Program", If(SortDescending1, Descending, Ascending))


Project Establishment.png


Once a project is established, a user will  go into the Set Project Milestones app and click a plus sign button to create a new line item inthe Set Project Milestones SP List, with the user only being able to select in a dropdown menu from the Site Program column that was created in the first app. So the column in the SP list is a lookup to the initial Project Establishment list. This works great, but on the BrowseScreen Gallery, the order of my Site Programs is based on the latest one created, not descending. Initially in the Gallery's Data/Items field, I have 'Set Project Milestones', which is the order of the latest created. If I try to use a similar formula as in the Project Establishment app, the gallery list goes blank. I think it has something to do with the Site Program column being a lookup column in the Set Project Milestones list, but I do not know what to adjust it too. The search and sort functionality doesn't work either. Below is the formula that doesn't work but I think is close.


SortByColumns(Filter('Set Project Milestones', StartsWith(Site_x0020_Program, TextSearchBox1.Text)), "Site_x0020_Program", If(SortDescending1, Descending, Ascending))


Set Project Milestones.png


Same Issue for Project Status.


View > Variables and make sure that is the name of the Variable and it is a Boolean type.


Save, close everything, reboot 3 times, and come back in. 😉 Maybe not reboot. But maybe let PowerApps try again. Sometimes it gets moody.

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

Resolved. Tough to do a sort without a sort icon and UpdateContext selection.

Hello @Shanescows ,


I have a simular case:


Default , i would like that the user see all items in the browsergallery.

IF they select a date from the datepicker, the items would be filtered. 

I would also like to give the users the possibility to search in other column(s) by typing in the searchbox. 

So i Have one date column and several lookupcolumns in the sharepointlist .

The filter on date part works but the combination with the lookupcolumns can i not figure out. 


I tried several formaula's but no one seems correct. 



Schermafbeelding 2019-12-26 om 14.27.33.png


Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.


New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,620)