cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Specified Column Doesn't Exist - sortbycolumns

I'm having some trouble fixing an issue with the SortByColumns function

 

This works on the Active Directory contacts List

SortByColumns(LastN(FirstN('ADContacts', 20), RoundDown(BrowseGallery1.Height/BrowseGallery1.TemplateHeight,0)), "TelephoneNumber", If(SortDescending1, Descending, Ascending))

 

But this does not work on my Phones 2 list

SortByColumns(LastN(FirstN('Phones 2', 20), RoundDown(BrowseGallery1.Height/BrowseGallery1.TemplateHeight,0)), "Extension", If(SortDescending1, Descending, Ascending))

 

I get an error message stating that the column "Extensions" does not exist, but it does exist exactly as referenced.

If I remove the sections related to the "SortByColumns", it works.

i.e.

LastN(FirstN('Phones 2', iter), RoundDown(BrowseGallery1.Height/BrowseGallery1.TemplateHeight,0))

 

Both lists are in SharePoint, the only difference between the two of them is the amount of records. There are about 10 records in 'ADContacts' and 1900 in 'Phones 2'. I've also changed the delegation value to 2000 in case that might have been a factor.

 

Any feedback on this would be appreciated.

 

 

1 REPLY 1
Super User II
Super User II

This shouldn't be an issue with delegation or anything, but may be a disambiguation issue or something with how that column is cached.

 

Can you add a new empty Gallery, use 'Phones 2' as the Items property, and the confirm that ThisItem.Extension is populating in a label (or any applicable control)? It may help to ensure the column is actually coming to PowerApps with that friendly name and can be referenced explicitly.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

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.

Top Solution Authors
Top Kudoed Authors
Users online (76,577)