web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Delegation

(0) ShareShare
ReportReport
Posted on by 65

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?

 

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ptempleton 

    Your Text functions in your filter are most likely causing you a delegation issue.  Is there any need to convert order shipment or detail invoice to text?  Are they not already text?

  • ptempleton Profile Picture
    65 on at

    They are text columns but for some reason when I remove the text(), it turns into an error.  That was the only way that I could figure out how to get around that issue.

     

    ptempleton_0-1601490278246.png

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ptempleton 

    Can you hover over that error and see what the error message is?

  • ptempleton Profile Picture
    65 on at

    This is the error that is provided. ptempleton_0-1601490521082.png  OrderShipment and 'Detail Invoice' are both fields in my entity.

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ptempleton 

    Both fields in your 'Customer Invoices' entity?

     

    Try the following:

    Sort(
     GroupBy(
     Filter('Customer Invoices', 
     (OrderShipment = InvoiceSearchBox.Text) ||
     ('Detail Invoice' = InvoiceSearchBox.Text)
     ),
     "crd26_ordershipment", "Data"
     ),
     crd26_ordershipment,
     Ascending
    )

     

  • ptempleton Profile Picture
    65 on at

    Now I am getting a error icon but the formula is not giving me an error when I click on the error icon...

    ptempleton_0-1601491221941.png

     

    ptempleton_1-1601491268100.png

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ptempleton 

    Are you clicking on this error, or the warning error?

    RandyHayes_0-1601491465288.png

     

  • ptempleton Profile Picture
    65 on at

    I am clicking on the error and selecting to view the formula... I do now have what the error is and it is complaining about the left operator not being in the entity.  I don't understand why it would say they aren't there.

     

    ptempleton_0-1601491657675.png

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ptempleton 

    What do you get if you replace with the actual names?

    Sort(
     GroupBy(
     Filter('Customer Invoices', 
     (crd26_ordershipment = InvoiceSearchBox.Text) ||
     (crd26_detailinvoice = InvoiceSearchBox.Text)
     ),
     "crd26_ordershipment", "Data"
     ),
     crd26_ordershipment,
     Ascending
    )
  • ptempleton Profile Picture
    65 on at

    I am not receiving any errors, however, my gallery is still displaying blank when I know that I have records in the CDS for this invoice.  There should be a gallery displaying on the right side but its 

    ptempleton_0-1601493967111.png

    ptempleton_1-1601494039903.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard