cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VieiraGuilhermo
Helper I
Helper I

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

@VieiraGuilhermo 
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

@VieiraGuilhermo 
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

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,034)