Skip to Content Skip to Menu

GroupJive Events custom fields

  • activha
  • activha
  • OFFLINE
  • Posts: 2334
  • Thanks: 117
  • Karma: 13
4 years 9 months ago #316596 by activha
Replied by activha on topic GroupJive Events custom fields
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 :
Code:
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
Code:
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 ?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 9 months ago #316598 by krileon
Replied by krileon on topic GroupJive Events custom fields
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 - 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.

  • activha
  • activha
  • OFFLINE
  • Posts: 2334
  • Thanks: 117
  • Karma: 13
4 years 9 months ago #316599 by activha
Replied by activha on topic GroupJive Events custom fields
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

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 9 months ago #316603 by krileon
Replied by krileon on topic GroupJive Events custom fields
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 - 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.

  • activha
  • activha
  • OFFLINE
  • Posts: 2334
  • Thanks: 117
  • Karma: 13
4 years 9 months ago #316606 by activha
Replied by activha on topic GroupJive Events custom fields
:-(
Ok maybe a future feature ?

Any other ideas for now ?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 9 months ago #316614 by krileon
Replied by krileon on topic GroupJive Events custom fields
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 - 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