Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

I can do it with CB query field?

11 years 3 months ago #231172 by simonetravaglini
I can do it with CB query field? was created by simonetravaglini
Hello,
I want ask you if is it possible to make the following integration with CB query field.

I'm using a component that store some data related to every user. I want this data are also present in CB user profile.

My question is: Is it possible take this data with CB query field and store it in CB useres?

It exixsts a documentation on CB query fields?

best regards!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago - 11 years 3 months ago #231193 by krileon
Replied by krileon on topic I can do it with CB query field?
As long as there's a way to link your data in your other component to CB (usually user_id) then yes it can accomplish this perfectly fine as it just outputs the results of a SELECT query as a CB field, but has substitution support.

My question is: Is it possible take this data with CB query field and store it in CB useres?

Yes, as it just takes the result of your database SELECT query and displays it as a field. Example query as follows.

Code:
SELECT `email` FROM `#__users` WHERE `id` = '[user_id]'

It exixsts a documentation on CB query fields?

Nope, most professional plugins do not come with documentation.


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.
Last edit: 11 years 3 months ago by krileon.
The following user(s) said Thank You: simonetravaglini

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

11 years 3 months ago #231208 by simonetravaglini
Replied by simonetravaglini on topic I can do it with CB query field?
It sounds very usefull!!! I'm going to try... ;)

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

11 years 3 months ago - 11 years 3 months ago #231242 by simonetravaglini
Replied by simonetravaglini on topic I can do it with CB query field?
Hello,
I made a test.

My purpose is to populate new CB user field, called "skills", with value taken from other component. I used the following sql query that give me the correct value.
Code:
SELECT category FROM sgj_jblance_user, sgj_jblance_category, sgj_users WHERE sgj_jblance_category.id=sgj_jblance_user.id_category AND '[user_id]'=sgj_jblance_user.user_id


The problem is that when I go in CB user list and I look at "skills" field, I have a multiselection (correct) populated with my extracted value repeted, but not selected.




p.s. the joombri component have a "skills" field that is multiselection

I hope I was clear in my explenation! :)
Attachments:
Last edit: 11 years 3 months ago by simonetravaglini.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago #231260 by krileon
Replied by krileon on topic I can do it with CB query field?
Your query doesn't look valid. Please see the tutorial below of proper query usage and example usage.

www.joomlapolis.com/support/tutorials/107-use-cases/18377-configuring-a-country-field-with-cb-query-field-plugin

Please see the below regarding SQL usage.

www.w3schools.com/sql/default.asp

Please see the below regarding substitution usage.

www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb


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