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

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users


We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (24,074)