Public
Frequent Advisor

Select more than one label? Is it possible?

Is it possible for users to select more than one label? Can we edit in any way the skin to make it possible??

13 Replies 13
Honored Contributor

On a topic, you can have an unlimited number of labels. When trying to filter by label though, out of box you can only filter by a single label.

It's possible to build the functionality to allow for filtering off of multiple labels using the API, but it's not a minor change by any means.

Frequent Advisor

Hello,

Do you know how to do it? 

 

And thank you so much for your time.

Honored Contributor

@adriana4u,

You can create it custom using the API.

Below is the example API to get messages based on multiple labels

Articles with all specified labels.

SELECT id, subject, href, view_href, kudos, post_time FROM messages WHERE board.id = 'this-is-an-international-blog' AND depth = 0 AND labels.text = "Label A" AND labels.text = "Label E" AND labels.text = "Label B" ORDER BY kudos.sum(weight) DESC LIMIT 10

 

Articles with one or more labels

SELECT id, subject, href, view_href, kudos, post_time FROM messages WHERE board.id = 'this-is-an-international-blog' AND depth = 0 AND labels.text MATCHES("Label A", "Label E", "Label B") ORDER BY kudos.sum(weight) DESC LIMIT 10

 

.......
Expecting your Kudos and Accepted Solution to my replies.

But doing this can I make it available for all the users to select more than one label without the API or is this only for admins to select more than one label?

 

Thank you

Hi @adriana4u,

Users can definitely select more than one label to attach to a post. Have a look at how we do it on Workshop as an example. We thought the default UI wasn't great so we have effectively created "buttons" that the user clicks on to select one or more labels for their post. 

Jason

C725D14F-38C3-452A-99BB-88EFA8B30D65.jpeg 

Generic1.jpg

Hello @JasonHill,

 

Hope to find you doing well. 

 

I know this one, thank you though! My question is, imagine they are browsing through a forum and want to select two labels to see posts with both of them? Or with three labels? Is this possible?

 

Thank you! 

Honored Contributor

Here is an example of something we did when I worked at Anaplan I should have shared earlier to confirm what you are looking for: https://community.anaplan.com/t5/Best-Practices/tkb-p/communitykb

I’m guessing this is what you are trying to get? Only way to accomplish this is via custom development. 

I really like this Jason, the button look in the styling.  Might have to steal that one 🙂

@melissapotvin - We copied Jason too :-D. 2021-09-24_13-06-31.png

Welcome to the Technology board!

Curious about our platform? Looking to connect on social technology? You've come to the right place!

Are you a Khoros customer? For direct assistance from our Support team, please visit the Support Forum.