I have an app that is connected to a SharePoint List that has over 7000 items, with about 500 being added daily. The app basically serves as a work queue and has a few filters and sort functions.
Before crossing the 5,000 item threshold, which caused errors with my app, my gallery/work queue "Items" property was the following:
SortByColumns(
Filter('Daily Picking Data - NEW DRAFT','Material Needed'.Value = "Yes" && Fulfillment.Value = "Review Needed" && Cancellation.Value = Blank()),
"SO_x0023_", Ascending, "WO_x0023_", Ascending, "Part_x0020_Number", Ascending, "Created", Descending)
Everything was great until we crossed the 5,000 item limit threshold. At that time, I quickly learned that I needed to index the columns that I was using to filter and sort in SharePoint. I did this and then everything worked just fine.
When I woke up the next day, I was getting the threshold errors yet again. However, If I removed all but one of the "Sorts" that I had, everything would work.
I am now utilizing the following in my "Items" property:
SortByColumns(
Filter('Daily Picking Data - NEW DRAFT','Material Needed'.Value = "Yes" && Fulfillment.Value = "Review Needed" && Cancellation.Value = Blank()),
"SO_x0023_", Ascending)
Does anyone have any suggestions as to why everything would have worked after I initially indexed the SharePoint columns, but failed the next day, but will work with only one level of sorting? I have another app that encountered this issue and also has multiple levels of sorts and everything works just fine in that app.
I hoping to learn how to avoid this issue in the future.