cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

SortByColumns Not working correctly

Hi, I am retyping this all due to an error with the site so please forgive my briefness;

 

I am having trouble getting the SortByColumns function to work correctly. My objective is to;

-take a table from an excel file in one drive

-filter the table based on a selection from a dropdown (also linked to the same excel table, supposed to be showing distinct values from a column)

-sort those filtered results based on another column in the table (numerical value). 

 

For some reason, a lot of the selections have elements appearing out of order, and i cannot figure out why. 

I have tried using both sort and sortbycolumns, and get similar results with both. It also seems that if i delete the sort part of the function and reapply it, it will work for the current dropdown selection only. 

 

Something i noticed that may be related so i will include it in case: For some reason, the table is getting cut off, and not all records are displaying in the powerapp dropdowns or tables, specifically, entries past a certain point near the end of the table seem to not exist. I will not include a screenshot of that unless requested as i dont THINK its directly related.

 

Thanks in advance for any advice or guidance! 

-Doug

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: SortByColumns Not working correctly

You are definitely running into delegation issues. Tge easiest way out is for you to change the non-delegation limit in App settings to 2000 (which is the max) if your max count is 2000 or less.

I will provide a link to the documentation in a few minutes.

Let me know if this helps.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

View solution in original post

7 REPLIES 7
Highlighted
Anonymous
Not applicable

Re: SortByColumns Not working correctly

Replying with a small update related to the missing values: The last record in the table i can access is the 501st excel row (so 500 records plus headings), is this some sort of maximum limit for powerapp tables? 

Highlighted
Super User
Super User

Re: SortByColumns Not working correctly

How many records do you have? You might be running into delegation issues.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
Highlighted
Super User
Super User

Re: SortByColumns Not working correctly

You are definitely running into delegation issues. Tge easiest way out is for you to change the non-delegation limit in App settings to 2000 (which is the max) if your max count is 2000 or less.

I will provide a link to the documentation in a few minutes.

Let me know if this helps.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

View solution in original post

Highlighted
Anonymous
Not applicable

Re: SortByColumns Not working correctly

Great, thank you for your incredibly prompt help! I will mark the answer with documentation as the solution when it is posted. This is definitely something i will need to read into more.

 

Highlighted
Super User
Super User

Re: SortByColumns Not working correctly

Here is a link that talks about delegable data sources and functions:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview#delegable-data-sour...

It also talks about how the limit can be changed from 500 to 2000.

Let me know if this helps.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
Highlighted
Anonymous
Not applicable

Re: SortByColumns Not working correctly

@PowerAddict 

You actually seem to have solved my issue with missing records, which has helped me solve the issue i originally posted about. 

 

It seems (now that i can view all of the results correctly) that it is sorting the RSS values as strings and not numerical values, (For instance, ordering {1, 20, 300, 4} as {4, 300, 20, 1}), so it seems i just need to interpret them as numerical values.

 

Thank you again for the help with my issues! 

Highlighted
Super User
Super User

Re: SortByColumns Not working correctly

Sounds great! Please mark the appropriate reply as the solution so it will be easy for others facing a similar issue to find it.

Thanks,
Hardit Bhatia
https://thepoweraddict.com

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,688)