cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Delegation problem

I was using a excel sheet as my bd, yesterday i change my bd to an sharepoint list, but when i migrate to sharepoint, some delegation problems started to pop out, as you can see in my screen shots. 

 

If(IsBlank(TextSearchBox2_2.Text);
   SortByColumns(
      Filter (BD_Coletor_1;
          Usuario <> "-"
);
   "Usuario";Ascending
);
If ( TextSearchBox2_2.Text = "Divergente"; 
   SortByColumns(
      Filter (
           BD_Coletor_1;
           Status= "Divergente"
              );"Status"; Ascending);
Search(
        BD_Coletor_1;
        TextSearchBox2_2.Text;
        "Usuario"
      )
                 )
)

 

 Everything seems to be working fine, but this delegation problem keeps making me felling anoyed. 
There is 3 Delegation problems with my gallery:
   - With my Filter
   - With my Search
   - And one linked to my user column, that i just dont understando. 

Overview: Audit app, to help my area to keeps control of wich person is using what asset.
There is probably 40 rows at max. 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@Anonymous 
If you have only 40 rows you do not need to care about delegation warnings.  They only affect your app after you have more than 2,000 rows inside a table.

If you will have more than 2,000 rows in your app here's my proposed solution

 

If(
    IsBlank(TextSearchBox2_2.Text);
    Sort(
        Filter (
            BD_Coletor_1;
            StartsWith(Usarsio, "-")
        );
        Usuario; Ascending
    );
    If(TextSearchBox2_2.Text = "Divergente"; 
    Sort(
        Filter(
            BD_Coletor_1;
            Status = "Divergente"
        ); 
        Status; Ascending
    );
    Filter(
        BD_Coletor_1;
        StartsWith(Usuario, TextSearchBox2_2.Text)
    )
)

 

 

An explanation of my changes:

 

#1 SORTBYCOLUMNS:  change all of these to SORT instead.  SORT can be delegated.

#2 SEARCH: replace this with STARTSWITH.  STARTSWITH can be delegated.
#3 Usario <> "-": replace this with STARTSWITH.  The <> operator cannot be delegated.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

1 REPLY 1
mdevaney
Super User
Super User

@Anonymous 
If you have only 40 rows you do not need to care about delegation warnings.  They only affect your app after you have more than 2,000 rows inside a table.

If you will have more than 2,000 rows in your app here's my proposed solution

 

If(
    IsBlank(TextSearchBox2_2.Text);
    Sort(
        Filter (
            BD_Coletor_1;
            StartsWith(Usarsio, "-")
        );
        Usuario; Ascending
    );
    If(TextSearchBox2_2.Text = "Divergente"; 
    Sort(
        Filter(
            BD_Coletor_1;
            Status = "Divergente"
        ); 
        Status; Ascending
    );
    Filter(
        BD_Coletor_1;
        StartsWith(Usuario, TextSearchBox2_2.Text)
    )
)

 

 

An explanation of my changes:

 

#1 SORTBYCOLUMNS:  change all of these to SORT instead.  SORT can be delegated.

#2 SEARCH: replace this with STARTSWITH.  STARTSWITH can be delegated.
#3 Usario <> "-": replace this with STARTSWITH.  The <> operator cannot be delegated.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,935)