Skip to Content Skip to Menu

Lost with the Search tool ...

  • ducky13
  • ducky13
  • OFFLINE
  • Posts: 15
  • Thanks: 3
  • Karma: 0
2 years 7 months ago - 2 years 7 months ago #328659 by ducky13
Lost with the Search tool ... was created by ducky13
Hello there at Jomlapolis,

I am a bit lost with the functioning of the search tool.
Among other simple fields, I also have a radio button field, for gender (Man, Woman), a multiple checkbox for languages, and a second one for languages using a multiselect drop-down (I create these 2 for testing wich one I will keep at the end).

First problem, with the radio button field : when I select "Man" I also get woman users in the result. But when I select "Woman" I only get woman users. Don't understand why ! (for sure there is no gender mistake in the users profiles)

Second problem, with the multiple checkbox and with multiselect drop-down : for instance, if I want users speaking "Spanish" I only get those who ONLY selected this languages. If they also selected another language (because of the multiselect possibility) they don't show-up. Actually, users only show-up if I ask for all exact languages they have selected.

Perhaps the problem comes from the setting of the "Criteria" in the Search tab of the CB list :
- Simple exact match ...
- Simple any word ...
- Advanced ...

Actually, the only way to get what I want is the option : Avanced ...
But this way of functioning is a bit complicate and not very easy to understand for our users (most are basic computer users).

Could you recommend a solution ?
At least is there any option to work with the "Advanced" option ONLY with these "multiselection" fields ?

Thanks in anticipation for you help !
Last edit: 2 years 7 months ago by ducky13.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
2 years 7 months ago #328672 by krileon
Replied by krileon on topic Lost with the Search tool ...
Likely because you're using Simply Any searching ("Search criteria" is set to "Simple Any word match: Only 'any of' and ranges (WARNING: can be slow)"). This allows for partial searching. "Man" is in the word "Woman". This means a partial search will match. When you create select type fields (select, multiselect, multicheckbox, radio) you should be using a unique key for each options value. Example as follows.

Value: GENDER_MALE
Label: Man
Value: GENDER_FEMALE
Label: Woman

This will solve your issue. Alternative is you'll have to use Simple Is searching which does exact matching and not partial matching. To do this set "Search crieteria" to "Simple Exact match: Only 'is' and ranges".


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • ducky13
  • ducky13
  • OFFLINE
  • Posts: 15
  • Thanks: 3
  • Karma: 0
2 years 7 months ago - 2 years 7 months ago #328676 by ducky13
Replied by ducky13 on topic Lost with the Search tool ...
Thanks for your swift reply !

So, I made what you recommended, for both unique key value and search criteria setting (Simple Exact match ...), and now it works for radio button, with a unique alternative (Yes/No, On/Off), it means a unique value.

But I still cannot deal with multi-options (multiselect drop-down, multicheckbox).
The search only works with Search criteria sets on "Avanced ..." and option "contains one of". I guess because when I set search criteria on (Simple Exact match ...) values are not considered separately (English | Spanish | French) but as a whole thing [English,Spanish,French].

Is there any way to automatically set (embed) this type of search criteria (contains one of) on "multiselect" fields, whatever the global search criteria setting is ?
Perhaps I am asking for the moon ;-) ! But who knows ? Whatever .. it should work this way.
Last edit: 2 years 7 months ago by ducky13.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
2 years 7 months ago #328692 by krileon
Replied by krileon on topic Lost with the Search tool ...
Values stored in the database should not be language specific. That's why I've suggested above to use specific keys. The "one of" behavior should be the default when using "Simple Any" searching behavior and you select 1 value in a multiselect. If you're using "Simple Is" then no you won't be able to do that since it's exact matching. You don't need to use "Simple Is" though if you've changed your stored field values to use unique keys explained above though.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum