[SOLVED] Use field substitutions in advanced query userlist

12 years 4 weeks ago - 12 years 3 weeks ago #197143 by kbotnen
Hi,

I use dynamic userlists on my site, and I have a question regarding using subsitution in the fields.

In earlier version this would work as an advanced filter in a userlist.
`cb_kategori` LIKE '[cb_kategori]'

but now this does not work.

After a lot of trying and failing I searched the forum and found this one:

2960 CB 1.7.1 substitution check uses language string value instead of stored field value


I think my problem is the text returned from [cb_kategori]. It resolves to "IT / TV / Internet" , and therefor it somehow fails. Probably due to the spaces and-or / characters.

when debug my site I see it resolves to:
`cb_kategori` LIKE 'IT / Telekommunikasjon / Internett'

in earlier versions it would have resolved to:
`cb_kategori` LIKE '_UE_Category_1'

any tips on how I can make this work again?

-K-

Please Log in to join the conversation.

12 years 3 weeks ago #197224 by krileon

when debug my site I see it resolves to:

Correct, it now translates the values.

in earlier versions it would have resolved to:

We're still discussing whether this is a bug or not and if it needs fixing. It only affects select type fields such as radio, multi-checkbox, dropdown, and multi-dropdown.

any tips on how I can make this work again?

I suppose you can try retrieving the value with CB Query Field as it gives raw database value then try substituting that in.


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.

12 years 3 weeks ago #197439 by kbotnen
Hi,

Your suggestion did work.

I created a new field CB Query Field "cb_kategoriRAW" , and substituted that in my advanced list filter.

The query I used was: SELECT cb_kategori FROM jos_comprofiler WHERE id = [user_id]

Thanks for the help.

Wonderful support as always :)

for me this issue is now solved, but maybe its an idea to include this in the documentation that the substitution behave different. If you follow the instructions as they are now it will not work. I think it was chapter 7 in the documentation, but I cant remember which page (and I dont have the documentation here right now).

-K-

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.204 seconds

Facebook Twitter LinkedIn