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:
Solved! Go to Solution.
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.
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.
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
That is exactly the question I was asking - you might give @Nouhaila a chance to respond.
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
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?
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?
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
255 | |
127 | |
85 | |
84 | |
67 |