Skip to Content Skip to Menu

Specific use of connections with Auto Actions

  • emthev
  • emthev
  • OFFLINE
  • Posts: 12
  • Thanks: 0
  • Karma: 0
12 years 3 months ago #206210 by emthev
Hi krileon,

I have did it like you told me : I cretaed CB Userlists.
As it was a multiselect drop down, equal was not good and LIKE was not good too because several names looked like the same.

So in advanced filter of the userlist I have put :
Code:
`cb_field` REGEXP "^(.*\\|)?MYVALUE(\\|.*)?$"
It's working good, I just have a problem : it seems that the php function StripSlashes is used when the list is edited. So each time I open a list in the backoffice, one slash of the code disappears when I save. If I edit twice the list, all slashes have disappeared.
Could there be a way to disable this function ?

Thanks again for your help ! :)

Em

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
12 years 3 months ago #206223 by krileon
You'd need to edit core code to remove the strip slashes, which I can't help you with as we don't support core edits. I recommend not repeat editing the userlist, but to configure as needed then add your REGEX for best results.

As long as your values don't contain commas you can use the below Advanced filter. This will work for all multiselect fieldtypes. Normally LIKE with wildcards should just be used, but if you need exact value matching (have values that contain other values would cause LIKE to not function right) then the below should do the trick.
Code:
( FIND_IN_SET( 'MYVALUE', REPLACE( `cb_field`, '|*|', ',' ) ) >= 1 )

There's several other ways to go about it instead of using REGEX as REGEX for MYSQL is pretty slow.


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