cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nouhaila
New Member

Getting Delegable warning with StartsWith

Hi,

I have an application which uses Sharepoint list as its source, filter the gallery the with multiple columns my code is working but I am getting Delegable warning.

SortByColumns(
    Filter(
        [@Référence]; 
        StartsWith(Titre;TextInput1_4.Text) ||  //column 1
        StartsWith('Le client';TextInput1_4.Text) ||  //column 2
        StartsWith(Technologies;TextInput1_4.Text) &&  //column 3
            
(Services.Value=ComboBox1_13.Selected.Value || ComboBox1_13.Selected.Value=Blank())

&&

(Secteurs.Value=ComboBox1_12.Selected.Value || ComboBox1_12.Selected.Value=Blank())

);

    "Title";
    If(SortDescending1; Descending; Ascending))


I want to fix the delegable warning:


1 ACCEPTED SOLUTION

Accepted Solutions

@Nouhaila ,

That is partly because if any element of the Filter is not Delegable, then the whole filter becomes not Delegable. I suspect you should be able to do all the filters except for Technologies. However you also need the or || filter items bracketed.

SortByColumns(
   Filter(
      [@Référence]; 
      (
         StartsWith(
            Titre;
            TextInput1_4.Text
         ) ||
         StartsWith(
            'Le client';
            TextInput1_4.Text
         ) 
      ) &&
      (
         ComboBox1_13.Selected.Value=Blank() ||
         Services.Value=ComboBox1_13.Selected.Value
      ) &&  
      (
         ComboBox1_12.Selected.Value=Blank() ||
         Secteurs.Value=ComboBox1_12.Selected.Value 
      )
   );
   "Title";
   If(
      SortDescending1; 
      Descending; 
      Ascending
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

15 REPLIES 15
WarrenBelz
Super User
Super User

Hi @Nouhaila ,

Firstly, StartsWith() is Delegable, so the issue is not there - what type of fields are Titre, 'Le Client' and Technologies?

Also, you might tidy up your and/or bracketing

SortByColumns(
   Filter(
      [@Référence]; 
      (
         StartsWith(
            Titre;
            TextInput1_4.Text
         ) ||
         StartsWith(
            'Le client';
            TextInput1_4.Text
         ) || 
         StartsWith(
            Technologies;
            TextInput1_4.Text
         ) 
      ) &&
      (
         ComboBox1_13.Selected.Value=Blank() ||
         Services.Value=ComboBox1_13.Selected.Value
      ) &&  
      (
         ComboBox1_12.Selected.Value=Blank() ||
         Secteurs.Value=ComboBox1_12.Selected.Value 
      )
   );
   "Title";
   If(
      SortDescending1; 
      Descending; 
      Ascending
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Prakash4691
Super User
Super User

@Nouhaila ,

 

Kindly validate below details,

 

1. SortByColumns is delegable only for Number, Text, Boolean and DateTime datatypes and not for any complex datatype.

2. StartsWith only works with text and complex data type.

3. Email and DisplayName are delegable in the Person data type.

 

Check if any complex data type has been used inside.

 

 

Regards,

Prakash

@Prakash4691 ,

That is exactly the question I was asking - you might give @Nouhaila a chance to respond.

@WarrenBelz ,

 

Hope so.

Hi @WarrenBelz  @Prakash4691 

The Date type of the fields which I have used are :

Titre  >>>>>>>  single line of text
Le client >>>>>> single line of text
Technologies >>> Multiple Line of text
le project >>>>>>single line of text

@Nouhaila ,

The Delegation issue is the Multiple lines of Text (Technologies) - queries on this field type are not Delegable.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

Hi @WarrenBelz 
So, how to fix this? 

 

and I am getting an issue, I cannot filter the gallery when I want to filter it with any of the combo boxes.

SortByColumns(
   Filter(
      [@Référence]; 
      (
         StartsWith(
            Titre;
            TextInput1_4.Text
         ) ||
         StartsWith(
            'Le client';
            TextInput1_4.Text
         ) || 
         StartsWith(
            Technologies;
            TextInput1_4.Text
         ) 
      ) &&
      (
         ComboBox1_13.Selected.Value=Blank() ||
         Services.Value=ComboBox1_13.Selected.Value
      ) &&  
      (
         ComboBox1_12.Selected.Value=Blank() ||
         Secteurs.Value=ComboBox1_12.Selected.Value 
      )
   );
   "Title";
   If(
      SortDescending1; 
      Descending; 
      Ascending
   )
)


Services and Secteurs are both Choice column.

 

 

Can you help me fix?

@Nouhaila 

 

Check whether search is enabled for combo box because it is not delegable.

Hi @Prakash4691 

The search is enabled (IsSearchable) which is true for both combo boxes, and I cannot filter the gallery with the Combo Boxes only too.

with my code, can you please check?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,953)