I have a CDS entity with roughly 9k records and that will have multiple lines detailing item information for an invoice. I need a gallery that will display a number of invoice options based on a search box. My gallery is was working well before I assume that I hit the delegation limit. I need to have the gallery return back a single entry for an initial search request instead of returning back 20 entries if there are 20 items on that invoice.
I have my code set as Sort(GroupBy(Filter('Customer Invoices', Text(OrderShipment) = InvoiceSearchBox.Text Or InvoiceSearchBox.Text = Text('Detail Invoice')),"crd26_ordershipment","Data"),crd26_ordershipment,Ascending) for the items of the gallery. However, now that my datasource is over 2000 lines, it is showing blank and not returning any invoices or it is only displaying the most recent invoices.
If the filter occurred on the CDS and then returned only the entries based on the search, the results should be far less than the delegation 2000 limit, but this does not seem the be what is happening.
How can I get past this?