web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Specified Column Doesn...
Power Apps
Unanswered

Specified Column Doesn't Exist - sortbycolumns

(0) ShareShare
ReportReport
Posted on by 12

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.

 

 

Categories:
  • GarethPrisk Profile Picture
    2,828 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard