CB Query Field or CB Code Field

6 months 3 days ago #303693 by reeg99
I have Joomla 3.8.x and CB 2.1.4

I have a requirement to generate a customer reference code for each user registered on my site.

The reference code should be computed when a user first registers and be saved in their profile

The field will comprise one of a standard list of abbreviations (in a custom table I'll create) - selected based on a value chosen from another CB profile field (drop down list, single selection) and the user ID number.

e.g. XYZ1234 where XYZ would correspond to the XYZ location in my lookup table, location being a CB profile field and 1234 would be the user ID number (from the comprofiler table)

Do I need the CB Query Field or CB Code Field plugin?

Or is there another way to do this without either plugin?

thanks.
6 months 3 days ago #303704 by krileon
Depends on if you can generate the code you're wanting using entirely SQL functions. If not and you need PHP then CB Code Field otherwise you'd be fine with CB Query Field. Neither field stores their values in the database though so if you need it generate and stored in the database your only option is CB Auto Actions.


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.
6 months 3 days ago #303709 by reeg99
Ok Thanks.
Just to be clear, I assume you mean I'll need CB Auto Actions in addition to CB Query Field
6 months 2 days ago #303732 by krileon

Just to be clear, I assume you mean I'll need CB Auto Actions in addition to CB Query Field

It depends on what you need exactly. If you want to generate and display the code on a users profile dynamically and do not need it actually stored in the database then all you need is CB Query Field (if intend to do this with SQL only) or CB Code Field (if you need PHP). If you need it generated then stored in the database you can combine CB Query Field or CB Code Field with CB Auto Actions or just do it strictly with CB Auto Actions.


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.
5 months 4 weeks ago #303777 by reeg99
Thanks
Moderators: beatnantkrileon
Time to create page: 0.452 seconds
Facebook Twitter Google LinkedIn