cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

Re: SQL First;sortbycolumns suddenly delegation error

Ignoring the warning might be fine but at the end of the day I don't want warnings to remain otherwise at some point I can no longer see the forest for the trees.

Highlighted
Community Support
Community Support

Re: SQL First;sortbycolumns suddenly delegation error

Hi @HansHeintz ,

According to your scenario, I think the Delegation limit would not affect your needs. The following formula could achieve your needs:

Set(MaxRecID; First(FirstN(Sort('[dbo].[dier]'; dier_id; Descending); 1)).dier_id)

 

In above formula, the Sort formula is delegable, so it could sort your SQL Table ('[dbo].[dier]') records based on the "dier_id" column properly in Descending order. The Sort formula could delegate the data process to your SQL Table properly without any Delegation issue. The max dier_id value would be at the first record in your Sort formula result.

 

The FirstN functionality is not a Delegable function, so it could only process first 2000 records locally at most. So the FirstN function could only process first 2000 records at most from the Sort formula result. The max dier_id value has been existed at the first record of the first 2000 records from the Sort formula result.

Note: Please make sure you have set the "Data row limit for Non-delegable queries" option to maximum value -- 2000 within Advanced settings of App settings of your app.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Resolver II
Resolver II

Re: SQL First;sortbycolumns suddenly delegation error

Thanks, already posted this solution myself above so will mark that as the solition 😜

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 (7,392)