I have a gallery which is showing a list of employees from a CDS entity (Employees). I want to be able to filter the list by last name or employee Id using "in" and by district using a drop down list (contains "Northwest", "Southeast", etc.). The filter looks like this right now
Filter(
[@Employees],
And(
Or(TextInput_Search.Text in 'Last Name',TextInput_Search.Text in 'Employee Id'),
District = Dropdown_Districts.Selected.Value
)
)
If I remove the And and the or line filtering on the text input, the gallery works as expected so I'm pretty sure that's what's messing me up. 'Last Name' is a custom text field and 'Employee Id' is custom whole number field on the Employees entity.
The error I am getting is "The requested operation is invalid. Server Response: No function signature for the function with the name 'contains' matches the specified arguments. The function signatures considered are: contains(Edm.String Nullable=true, Edm.String Nullable=true)
I have tried googling the error but haven't been successful so far. I know "in" is delegable so I don't think it's that and it's an error not a delegation warning anyway...
Hi @Cooper01 ,
Could you please share more details about the error message within your app?
Could you please share a bit more about the "District" column in your Employees Entity? Is it a Text type column?
Please consider modify your formula as below:
Filter(
[@Employees],
TextInput_Search.Text in 'Last Name' || TextInput_Search.Text in Text('Employee Id'),
District = Dropdown_Districts.Selected.Value
)
Please consider take a try with above solution, check if the issue is solved.
Also please consider take a try with the following workaround:
Filter(
[@Employees],
StartsWith('Last Name', TextInput_Search.Text) || StartsWith(Text('Employee Id'), TextInput_Search.Text),
District = Dropdown_Districts.Selected.Value
)
Please take a try with above solution, check if the issue is solved.
Best regards,
ankit_singhal
11
Super User 2025 Season 1
stampcoin
11
mmbr1606
9
Super User 2025 Season 1