# Write Customize Query for Group Channel list

**URL:** <https://community.sendbird.com/t/write-customize-query-for-group-channel-list/766>\
**Category:** Miscellaneous\
**Created:** [August 6, 2020, 10:52am UTC](https://community.sendbird.com/t/write-customize-query-for-group-channel-list/766 "2020-08-06T10:52:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vcs\_account](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/vcs_account/32/408_2.png) [@vcs\_account](https://community.sendbird.com/u/vcs_account)\
**Post date:** [August 6, 2020, 10:52am UTC](https://community.sendbird.com/t/write-customize-query-for-group-channel-list/766/1 "2020-08-06T10:52:01Z")

</div>

Hi,  
I am looking into UIKit which is Available for web application that how to get filter group channel list by  
custom type?  
actually i am unable to write code because i am new in react.js.  
anybody send me sample code aur example.How to use this function in react.js and how to use **groupChannels** object .

```auto
var myChannelListQuery = sb.GroupChannel.createMyGroupChannelListQuery();
myChannelListQuery.includeEmpty = true;
myChannelListQuery.channelUrlsFilter = ['seminar', 'lecture'];

myChannelListQuery.next(function(groupChannels, error) {
    if (error) {
        return;
    }

    // A list of group channels that have 'seminar' or 'lecture' in their URLs is returned.
    console.log(groupChannels);
});

```

---

<div class="post-metadata">

**Author:** ![Sravan\_S](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/sravan_s/32/83_2.png) [@Sravan\_S](https://community.sendbird.com/u/Sravan_S)\
**Post date:** [August 7, 2020, 6:41am UTC](https://community.sendbird.com/t/write-customize-query-for-group-channel-list/766/2 "2020-08-07T06:41:36Z")

</div>

Hi @vcs_account

I think example 3-2 might be helpful for you. Take a look at “”

> **[sendbird/SendBird-JavaScript](https://github.com/sendbird/SendBird-JavaScript/tree/master/uikit-samples#3-2-customizing-channellistquery)**
>
> SendBird JavaScript Sample. Please visit https://community.sendbird.com for any questions! - sendbird/SendBird-JavaScript

Just add

```auto
 <SBChannelList
  onChannelSelect={channel => {
    if (channel && channel.url) {
      setCurrentChannelUrl(channel.url);
    }
  }}
  queries={{
    channelListQuery: {
      includeEmpty: true,
      channelUrlsFilter = ['seminar', 'lecture'];
    },
  }}
/>

```

Side not - I saw you made a similar question at [Get Channel List by Customtype](https://community.sendbird.com/t/get-channel-list-by-customtype/768) is it a separate question?

---

<div class="post-metadata">

**Author:** ![vcs\_account](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/vcs_account/32/408_2.png) [@vcs\_account](https://community.sendbird.com/u/vcs_account)\
**Post date:** [August 7, 2020, 9:14pm UTC](https://community.sendbird.com/t/write-customize-query-for-group-channel-list/766/3 "2020-08-07T21:14:02Z")

</div>

Thanks @Sravan_S,  
I got channel list which i wanted.  
But I am stuck another issue actually i want to get messages base on custom type filter in group channel but i have not seen any solution in UIKit document. All examples provide with openChannel.  
But I need to get messages base on customtype filter and also create group messages with customtype using UiKit  
Do you have any solution or idea. That’s would be helpful for me.  
Thanks

---

<div class="post-metadata">

**Author:** ![Sravan\_S](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/sravan_s/32/83_2.png) [@Sravan\_S](https://community.sendbird.com/u/Sravan_S)\
**Post date:** [August 11, 2020, 1:20am UTC](https://community.sendbird.com/t/write-customize-query-for-group-channel-list/766/4 "2020-08-11T01:20:20Z")

</div>

> i want to get messages base on custom type filter in group channel

@vcs_account can you explain your use case a bit more better, an example might be nice

> All examples provide with openChannel

I think we are in different pages because UIKit doesn’t support open channel, do you mean SDK documentation?

You might want to look at [https://github.com/sendbird/SendBird-JavaScript/tree/master/uikit-samples#2-2-customizing-messagelistparams](https://github.com/sendbird/SendBird-JavaScript/tree/master/uikit-samples#2-2-customizing-messagelistparams) if you want to see how to customize MessageListParams

To add custom types to messages - you can follow this example [https://github.com/sendbird/SendBird-JavaScript/tree/master/uikit-samples#2-5-customizing-messageinput](https://github.com/sendbird/SendBird-JavaScript/tree/master/uikit-samples#2-5-customizing-messageinput) or [https://github.com/sendbird/SendBird-JavaScript/tree/master/uikit-samples#2-3-customizing-messageparams](https://github.com/sendbird/SendBird-JavaScript/tree/master/uikit-samples#2-3-customizing-messageparams) depending on what level of customization you need

---

<div class="post-metadata">

**Author:** ![vcs\_account](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/vcs_account/32/408_2.png) [@vcs\_account](https://community.sendbird.com/u/vcs_account)\
**Post date:** [August 11, 2020, 6:00am UTC](https://community.sendbird.com/t/write-customize-query-for-group-channel-list/766/5 "2020-08-11T06:00:41Z")

</div>

Thanks @Sravan_S,  
I have finished this task successfully.  
Can I create Users with meta data in UIKit React.js?
