[SOLVED] Auto increment field?

12 years 2 weeks ago - 12 years 2 weeks ago #193762 by sirweb
[SOLVED] Auto increment field? was created by sirweb
Is it possible to create a field for member number (with or without extra plugins) that autoincrements +1 for each registration of user?

Please Log in to join the conversation.

12 years 2 weeks ago #193765 by nant
Replied by nant on topic Re: Auto increment field?

shultman wrote: Is it possible to create a field for member number (with or without extra plugins) that autoincrements +1 for each registration of user?


can't you use the unique user id?

Please Log in to join the conversation.

12 years 2 weeks ago #193766 by sirweb
Replied by sirweb on topic Re: Auto increment field?

nant wrote:

shultman wrote: Is it possible to create a field for member number (with or without extra plugins) that autoincrements +1 for each registration of user?


can't you use the unique user id?


I need to make it visible in the profile, searchable and also usable in the user lists.

Please Log in to join the conversation.

12 years 2 weeks ago #193824 by krileon
Replied by krileon on topic Re: Auto increment field?

shultman wrote:

nant wrote:

shultman wrote: Is it possible to create a field for member number (with or without extra plugins) that autoincrements +1 for each registration of user?


can't you use the unique user id?


I need to make it visible in the profile, searchable and also usable in the user lists.

You can do everything except for search-ability using [user_id] substitution in a delimiter field.

If you want to make it searchable then first create an integer field. Then install CB Auto Actions. Next create a field action using the after registration trigger and set your integer field to [user_id] and it'll store the user_id to that field. Now that it's an actual field it can be searched and used as you would any other field.

If you still want incrementing field then do the same as the above except use a query action to update the fields value as you'll need to database query to determine the next 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.
The following user(s) said Thank You: sirweb

Please Log in to join the conversation.

12 years 2 weeks ago #193825 by sirweb
Replied by sirweb on topic Re: Auto increment field?
Excellent. Thanks! :)

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.723 seconds

Facebook Twitter LinkedIn