[SOLVED] Field Query

11 years 9 months ago #207471 by mfe13
Replied by mfe13 on topic Re: Field Query
Hi Kile,

The field delimiter works well but I have a question.
I can't do in this case:

For example, I have a fields [cb_aaa] with a multiple choice possible: 1,2,3,4.
If the user selects 1 and 4.
In the field delimiter, I want to bring up only 4.
I put [cb: if cb_aaar = "4"] blablabla [/ cb: if]
but it doesn't appear.
I Need to add anything in the code?
Thank you in advance

Please Log in to join the conversation.

11 years 9 months ago #207498 by krileon
Replied by krileon on topic Re: Field Query
You need to use the includes operators. Example as follows.

[cb:if viewaccesslevel includes "1"]I am Public[/cb:if]
[cb:if viewaccesslevel !includes "1"]I am NOT Public[/cb:if]

Alternative is to use REGEX to match. Example as follows.

[cb:if cb_field=~"/1/"]Is 1[/cb:if]
[cb:if cb_field!~"/1/"]Is NOT 1[/cb:if]


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 to join the conversation.

11 years 9 months ago - 11 years 9 months ago #207536 by mfe13
Replied by mfe13 on topic Re: Field Query
I LIKE THIS COMPONENT !!!!!
I use that and it work very well !
[cb:if cb_field=~"/1/"]Is 1[/cb:if]


I dont't understrand that
[cb:if viewaccesslevel includes "1"]I am Public[/cb:if]
it doesn't depend on a specific field but depend on a plan ? It's right ?

Please Log in to join the conversation.

11 years 9 months ago #207563 by krileon
Replied by krileon on topic Re: Field Query

it doesn't depend on a specific field but depend on a plan ? It's right ?

No, it's a special condition for multiselect fields. Example as follows.

[cb:if cb_field includes "1"]Is 1[/cb:if]


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 to join the conversation.

11 years 9 months ago #207588 by mfe13
Replied by mfe13 on topic Re: Field Query
Ok...I understand
Thanks

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.215 seconds