GroupJive Events custom fields

1 month 3 weeks ago #316596 by activha
Sorry if I was not explaining very well...

All storage and display for GJ Events is working very well and I correctly display a formatted string depending on the value stored.

So for group owners with events everything is perfect.

The question was referring to a CB field used to display subscribed events by another user.

The field is a query dropdown field with single select and the query is :
SELECT e.* FROM `#__groupjive_plugin_events` AS e JOIN `#__groupjive_plugin_events_attendance` AS a
on a.`user_id` = '[user_id]' AND a.`event` = e.`id` JOIN `#__groupjive_groups` AS b ON  b.`id` = e.`group` AND b.`category` = '13'

then the options are
Value column : Id
Label Column : title
Group column : params

The problem is to get the correct formatting output for params in the value displayed in the drop down.

For now it shows the grouping as {"dropdown":"10"} and I cannot see how to format this in the CB field.

Any idea ?
1 month 3 weeks ago #316598 by krileon
You won't be able to generate a query select from a params column. The params column is always null or a JSON string. CB Query Field doesn't have any specific behavior for handling JSON stored params columns.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
1 month 3 weeks ago #316599 by activha
That's not what I wrote, we generate the query from the id/title columns and want to make a grouping by params.

This is working very well except that the output displays as I mentioned {"dropdown":"10"} and I then need to change {"dropdown":"10"} to show Category 1 for instance.

Can I do this with layout substitution and how ? knowing that this is only the group name that I want to substitute
1 month 3 weeks ago #316603 by krileon
You can't group by a value in the params column. CB Query Field has no functionality to parse out JSON stored params columns. That's why you're getting the raw JSON display of {"dropdown":"10"}.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
1 month 3 weeks ago #316606 by activha
:-(
Ok maybe a future feature ?

Any other ideas for now ?
1 month 2 weeks ago #316614 by krileon
Even if it was accessible with params_dropdown it'd just output 10 instead of Category 1, which will likely be supported in a future release but doesn't really solve your issue. I don't have a solution aside from using a Code Select provided by CB Code Field which lets you use PHP to output a dropdown selection instead of strictly SQL.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
Moderators: beatnantkrileon
Time to create page: 0.439 seconds

Facebook Twitter LinkedIn