87
Views
6
Comments
Solved
List remove based on condition

Hello,

I have a reactive app where i add information to a temporary list. I would like to be able to remove information on this temporary list based on a condition (example seqno = 50). I have explored with listfilter client action and listclear but it doesnt work as its clearing the newly generated list from listfilter. Any suggestions on this? Thank you!

2024-09-12 02-43-38
Deepsagar Dubey
Solution

Hi @Low Nico 

You can use ListIndex and ListRemove client action to remove a specific element from a list based on list position.


Use ur condition (example seqno = 50) in ListIndex action it'll return position of that element in list then pass the output position in ListRemove action. 

UserImage.jpg
Low Nico

Thank you Deepsagar! This was very helpful!

2024-03-23 18-16-49
Bryan Villalobos
Solution

Hi @Low Nico 

After your ListFilter, you need to have a foreach and loop through your ListFilter List.

Then inside the loop, drag a ListindexOf to get the position of the current item in the temporary list. Then drag a ListRemove after that to remove the item in the ListIndexOf output from the temporary list. Would be something like this:


Regards,

Bryan

UserImage.jpg
Low Nico

Thanks Bryan, this method worked well as I needed to remove multiple from the list!

2020-07-21 19-28-50
Rajat Agrawal
Champion
Solution

Hi Low,

You can use foreach loop also and in that you can check with if condition you can match if it satisfy your condition than put in that local list if not than continue your loop without adding that record inside that list.

As per Deepsagar reply you can use list index and list remove also.

There is many ways to do the changes.

Regards,

Rajat 


UserImage.jpg
Low Nico

Thank you again Rajat, the foreach loop method worked well!

2024-09-12 02-43-38
Deepsagar Dubey
Solution

Hi @Low Nico 

You can use ListIndex and ListRemove client action to remove a specific element from a list based on list position.


Use ur condition (example seqno = 50) in ListIndex action it'll return position of that element in list then pass the output position in ListRemove action. 

UserImage.jpg
Low Nico

Thank you Deepsagar! This was very helpful!

2024-03-23 18-16-49
Bryan Villalobos
Solution

Hi @Low Nico 

After your ListFilter, you need to have a foreach and loop through your ListFilter List.

Then inside the loop, drag a ListindexOf to get the position of the current item in the temporary list. Then drag a ListRemove after that to remove the item in the ListIndexOf output from the temporary list. Would be something like this:


Regards,

Bryan

UserImage.jpg
Low Nico

Thanks Bryan, this method worked well as I needed to remove multiple from the list!

2020-07-21 19-28-50
Rajat Agrawal
Champion
Solution

Hi Low,

You can use foreach loop also and in that you can check with if condition you can match if it satisfy your condition than put in that local list if not than continue your loop without adding that record inside that list.

As per Deepsagar reply you can use list index and list remove also.

There is many ways to do the changes.

Regards,

Rajat 


UserImage.jpg
Low Nico

Thank you again Rajat, the foreach loop method worked well!

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