# Contains function in list

**URL:** <https://community.triggre.com/t/contains-function-in-list/255>\
**Category:** Support\
**Created:** [February 16, 2023, 10:51am UTC](https://community.triggre.com/t/contains-function-in-list/255 "2023-02-16T10:51:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albert.wemmers](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Albert.wemmers](https://community.triggre.com/u/Albert.wemmers)\
**Post date:** [February 16, 2023, 10:51am UTC](https://community.triggre.com/t/contains-function-in-list/255/1 "2023-02-16T10:51:07Z")

</div>

Hi,

I have an overview of groups that contain user information. In the user overview, you can filter by username using the “text a contains b” function. However, I’m having trouble filtering in the group overview with student information. The “list a contains b” function needs to be used for this, but unlike the “text a contains b” function, it only shows groups when a name is fully typed out. I’m wondering how I can solve this problem so that it filters the same way as text filtering

---

<div class="post-metadata">

**Author:** ![Jesse](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.triggre.com/jesse/32/88_2.png) [@Jesse](https://community.triggre.com/u/Jesse)\
**Post date:** [February 16, 2023, 11:55am UTC](https://community.triggre.com/t/contains-function-in-list/255/2 "2023-02-16T11:55:43Z")

</div>

Hi Albert,

The _List A contains B_ function indeed works only with 100% matches to items in the list. If I understand correctly, you want to show a list of groups that a student is in, by typing (part of) their username.

In other words, you have a GROUP which contains USERS and they have a USERNAME. I assume that groups can contain multiple users and users can be in multiple groups. You cannot easily search in the members of the group on a partial name on a page, however there is a solution:

**Solution**  
Every time you add a user to a group, or remove a user from a group, update a text property in the group data item where you store a list of the usernames. This way, you can filter with the _Text A contains B_ function on this property. Now you can search for users in the group, directly on the page.

To make a flow part that handles updating this list, do the following:

1. Add a property called _User search text_ to the data item _Group_
2. Make a flow part called _Update user search text for group_ with a _Group_ as input
3. Add an action that empties the _User search text_ property
4. Add a repeat action that goes through each _User of the group_
5. In the repeat action, make a calculation: _Concatenate **Group / User search text** with Concatenate **User / Name** with **,** _
6. In the repeat action, make an edit action that updates the _Inputs / Group / User search text_ with the result of the action under point 5.

Use this flow part whenever you make changes to the users in a group.

---

<div class="post-metadata">

**Author:** ![Albert.wemmers](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Albert.wemmers](https://community.triggre.com/u/Albert.wemmers)\
**Post date:** [February 16, 2023, 2:11pm UTC](https://community.triggre.com/t/contains-function-in-list/255/3 "2023-02-16T14:11:17Z")

</div>

How would this work for dates? If I have a start and end date, it should display the groups that have users with the dates and in between.

---

<div class="post-metadata">

**Author:** ![Jesse](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.triggre.com/jesse/32/88_2.png) [@Jesse](https://community.triggre.com/u/Jesse)\
**Post date:** [February 16, 2023, 2:53pm UTC](https://community.triggre.com/t/contains-function-in-list/255/4 "2023-02-16T14:53:40Z")

</div>

Currently that is not possible I think, unless you implement the search in a flow part and submit the search form. Then on the next page, after the flow part gives you the results, show those results from the flow part output.

Hope that helps!
