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

Avoiding Delegation Limit

I am having issues avoiding the delegation limits for a screen on my app. I have a dropdown that pulls a "Rig" from a collection (<200 items) and searches my SharePoint list (database is 1300 lines and growing) for the most recent row/ticket entry with that "Rig" name (I have my database sorted by the entry "End Time" descending). I then have a button that goes to the previous entry for that "Rig" and a reset button to go back to the latest record for that "Rig". Image attached. Is there a way where I can filter my SharePoint List by "Rig" using the dropdown, and be able to search through the remaining records from the most recent backwards in time? When a "Rig" is selected, the dropdown pulls up an Edit Form window. 

9 REPLIES 9
Highlighted
Dual Super User II
Dual Super User II

Re: Avoiding Delegation Limit

YOu should be able to Nest your filtering so you filter first by the delegable function and then filter the results locally.  Try this formula.

Set(varID, First(Filter(SortByColumns(Filter('Command Center Ticket Database',Rig=ComboBox3_1.Selected.Rig), "End_x0020_Time",Descending),ID < varID)).ID)

Assuming you have less than 500 items in the list where Rig = the selected value that should do it. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Avoiding Delegation Limit

@Pstork1 

 

Okay, thank you! I changed it. I am getting the delegation limit still, but the ComboBox3_1 pulls from a collection that will always be less than 500 lines. Does this mean I will be okay when the Command Center Ticket Database goes above 2000 items?

 

I also have ComboBox3_1 On Select set to :

Set(varID, First(Filter(SortByColumns('Command Center Ticket Database', "End_x0020_Time", Descending), Rig=ComboBox3_1.Selected.Rig)).ID)

 

Will this be okay as well?

 

Thank you for your time and assistance!

Highlighted
Dual Super User II
Dual Super User II

Re: Avoiding Delegation Limit

Correct, You'll still get the delegation warning, but by pre-filtering the list you should get the number of records being filtered by the non-delegable filter down to below the delegation limit.  That way you can safely ignore the trigger. 

 

The combobox should be fine since you say the list its pulling from will never be over 500.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Avoiding Delegation Limit

This may be a little off topic, but I have been having a hard time making a next button. I would like to be able to hit the back button to go through records from newest to oldest, but I would also like the option to go forward 1 by 1 instead of having to hit my reset button. Is it possible for me to go in the other direction after I have hit the "previous record" button a few times?

Highlighted
Dual Super User II
Dual Super User II

Re: Avoiding Delegation Limit

Not sure how you would do this.  The Back button only works because you've already been on that page.  Its not really going back to the previous record.  If you navigated there from another screen it will actually take you back to that previous screen.  Paging forward and back through a record list is a different functionality.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Avoiding Delegation Limit

@Pstork1 

 

Upon further testing, there seems to be a bug. It picks up the correct Rig name initially, but then the back button goes through all the entries with no rig name.

 

I have used this for On Select for the back button:

 

Set(varID, First(Filter(SortByColumns(Filter('Command Center Ticket Database',Rig=ComboBox3_1.Selected.Rig), "End_x0020_Time",Descending),ID < varID)).ID)

 

When I hit back after searching for Rig "528" it brings me to an entry with a blank Rig name, and every time I hit back it keeps searching through the entries with no rig names and never finds rig 528 again.

 

The 2 images I attached are the initial and after I hit the back button.

Highlighted
Dual Super User II
Dual Super User II

Re: Avoiding Delegation Limit

The Back button is meant to be the same thing as a browser back button. Its not designed to be a paging button. If you are going to use a specific OnSelect you need to make it independent of values in controls on the screen.  When navigating you could save the current value for the Rig dropdown.  That way you can reference that when you want to go back.  ButComboBox3_1.Selected.Rig is going to be blank on a Back button navigation.  That is the way its designed.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Avoiding Delegation Limit

How could I keep referencing the Rig in ComboBox3_1.Selected.Rig so that I am just searching through entries just for that Rig from most recent to least recent?

Highlighted
Dual Super User II
Dual Super User II

Re: Avoiding Delegation Limit

Unless you save the value seperately in a variable or a collection you can't.  There is no Most recent or least recent stored in a combo box.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

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 (6,026)