How to add filter according to two coloum in listfilter using Index ?

Hi Team ,

I want to search records according to two fields .

I have done according to one field , but for two fields i am not getting search result.

For two fields , i tried like this but its not working:


Index(SchoolGroupName+SchoolGroupDescription, SearchGroup) <> -1


This one is for one field  ,which is working fine.

Hi,

Have you tried with two expressions, like...

Index(SchoolGroupName, SearchGroup) <> -1 OR Index(SchoolGroupDescription, SearchGroup) <> -1

?

Hi Vivek,


As Wilbert Carpi mentioned you can try using OR to join both the conditions.

I would suggest you to use the filters of the aggregate as they work all the time.

Please share the oml.

Hey Vivek,

As mentioned by Changalrao, it's better to do this directly in your aggregate (in the case you have a large database and don't want to keep that big chunk in memory all the time).

Also the action you are doing seems to be fine, are you sure you are using the output of the listfilter correctly?

Hi,


I have tried to use the list filter by joining the condition with OR as 

SyntaxEditor Code Snippet

Index(Contact.City, search) <> -1 or Index(Contact.Name, search)<>-1

The output of the list filter is working as expected.

Kindly share your oml so that we can check where we need to work on.

Hi

@Changalrao Bairaboyana and @Wilbert Carpi as per your suggestions i did changes and its working fine , but  

case sensitive rule apply heres.

I dont want case sensitive filteration .

@Joey Moree I am comsuming rest api ,not using aggregates .

Solution

Hi,


Good to know that it works fine.

For case insensitive please refer the snippet below

  Index(text,keyword,ignoreCase:True) > -1

Here is the link for the same.

https://success.outsystems.com/Documentation/How-to_Guides/How_to_find_out_if_a_string_is_contained_in_another_string

Solution