i have data list from a server action and i want to filter it using ListFilter action, but i don't know how to filter the data using 'like' operator. how should i make it?
Hello!
You can't use LIKE in a list filter, or any assign in action flows, only the allowed expressions:
To use LIKE, you need to use it directly in an aggregate or SQL query.
If you have a list coming from a server action, isn't it an option to send a filter as input?
Hi Soo Jin,
You can use the built-in Index() function. Note that if you want to search case-insensitive, you also need to convert the text to uppercase or lowercase using ToUpper() or ToLower(). So say you filter a List called MyList, and MyList contains a structure with an Attribute MyText, and you want to find the text in a SearchText variable you could do it like this:
You should ToLower() SearchText as well, but since it's static, not inside the filter. Also you don't need ToLower() if you don't want to search case-insensitive, or if you don't have letters in your search text.
EDIT: Note that it is most likely faster if you can filter before you have the list, like Laura suggested. But if you cannot do that, use the above.