303
Views
8
Comments
Solved
filtering a list
Question
Application Type
Reactive
Service Studio Version
11.54.36 (Build 62983)
Platform Version
11.25.0 (Build 41684)

I have a list of data coming from data action in which I want to implement search by (name) on the table. I have used list filter to filter the data by the input and then appending the list using list all hence finally storing the data in a variable and displaying it. and I added if-else statement to display all the data of the table when the input for the search is null but I am getting no data as soon as I search for a  name. Can someone help me with the same? 
Attaching oml for better understanding.
Screen name is Admin/Users. 

Thank you in advance.

Hippa.oml
2023-04-17 05-19-55
Vaishali Shrivastava
Solution

Hi Aman,


Replace your list filter condition with this

Index(GetProgress.Users.Current.UserName,SearchEmployees) <> -1


Regards,

Vaishali

2023-11-22 10-08-21
Aman Agrawal

It works, thanks alot.

2024-05-08 06-29-37
Prince Aadil Khan Panwar

Just put the search filter into the data action by using the local variable of the screen. And try to refresh the data action on the onchangeevent screen event action.

Hope this helps

Thanks

Prince

2023-11-22 10-08-21
Aman Agrawal

into the data action as in from where I am calling the data?


2024-05-08 06-29-37
Prince Aadil Khan Panwar

Data action should be set as at start and when you type into the input create a onchange or on keypress event and refresh the data action.

2023-04-17 05-19-55
Vaishali Shrivastava
Solution

Hi Aman,


Replace your list filter condition with this

Index(GetProgress.Users.Current.UserName,SearchEmployees) <> -1


Regards,

Vaishali

2023-11-22 10-08-21
Aman Agrawal

It works, thanks alot.

2023-10-27 15-22-44
Rahul Yadav

Hi Aman,

I think you can follow what @Vaishali Shrivastava has suggested. Just an addition, clear the EndUsers list before appending all search results. 

Thanks

Rahul

2023-11-22 10-51-50
Jozy Sohail

Hi Aman,

As Vaishali suggested use index function in your list filter

Also there is no need to use both ListAppendAll and Assign to assign the values in EndUsers list, any one of them sufficient .

Hope it helps,

Thanks

2023-11-22 10-08-21
Aman Agrawal

Thanks, it helped alot.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.