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 III
Super User III

@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 III
Super User III

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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,894)