Below is a simple usage of a single CB integer field that increments. Note it does not have the complex conditions of groups that you are wanting, you must add that your self.
First you need to setup the integer field. Lets call it cb_autoinc as this will be its database column and be used throughout this usage.
Next you need to create a CB Query field (we'll call it cb_queryinc) that will pull from _comprofiler the highest value and increment it by 1. We can do this with the below query.
Code:
SELECTÂ ( `cb_autoinc` + 1 ) FROM `#__comprofiler` ORDER BY `cb_autoinc` DESC LIMIT 1
Now you'll need a field action using CB Auto Actions with the after registration trigger. You'll configure it to set cb_autoinc to the following value (a substitution of the query field).
[cb:userfield field="cb_autoinc" /]
Now everytime a user registers it should find the highest value of the increment field, add 1, then set the field for them as that incremented value.
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.