CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Membership number / code
Pages: [1]

Author Topic: Membership number / code  (Read 7865 times)

mike4miyu

  • Guest
Membership number / code
May 15, 2007, 01:11:41 am
Is it possible to have a unique code generated and placed in a custom field for members?

The idea being we can print membership cards that would include a membership number.

In Civievent phase 2 request:
http://wiki.civicrm.org/confluence/display/CRM/CiviEvent+-+Phase+2
Thom k has suggested "Allow people to register for paid events even if they are not paying on-line"

This would also be great if it was implemented for membership payments .
What would be ideal is if the generated unique id was used in an emailed/dispayed on screen instruction for EFT payments:

eg:
Thankyou for registering your membership at ...............

Please send your payment via EFT to:

ac name: top notch
bsb:       123 456
ac no. :   12345678
REF: asdf1234

PLEASE USE THE ABOVE REFERENCE IN YOUR PAYMENT DESCRIPTION

Any ideas?

iana

  • Guest
Re: Membership number / code
May 23, 2007, 01:18:58 am
Being able to assign a unique membership number to each new member is absolutely essential to our needs.

There is a unique number field for each contact which is called "Internal Contact ID". It is searchable, it can be imported, and it can be assigned to a profile. It is in many of the MySQL tables that CiviCRM uses and it is a primary key, auto increment, unsigned integer. It other words it is auto generated each time a new contact is entered. But I have not worked out how to use it. I can create a profile and include it as a field but I can't work out how to view my contacts using this profile (this part does not seem to be in the online manual).

Another problem is that our members already have membership numbers. It seems that Internal Contact IDs must exist first before import data can be mapped to them. I think I can import these numbers by first creating a set of dummy contacts (around 5000 or so) and then updating these on a second import, this time mapping the membership numbers to the Internal Contact IDs. Unless there is an easier way to do this.

The main thing I would like to know at this stage is how to display the Internal Contact ID.




Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Membership number / code
May 23, 2007, 09:58:44 am
Given that your members "already have membership numbers" - it might make more sense to use the "External Contact ID" field in CiviCRM as your unique member ID. This field is designed to hold unique identifiers imported/entered from another application. You can import the values from your other system - and then map them as the "match to contact" element when doing updates, importing contributions, etc.

Both the Internal and External ID's are displayed at the bottom of each Contact Summary screen (i.e. when you are "viewing" a contact). If you need to display Internal or External ID's in listings (i.e. search results) - you can accomplish this by creating a CiviCRM Profile which includes the field(s) "in selector".

You can use that Profile for a custom search and listings page ... http://<your site>/civicrm/profile?reset=1&gid=<profileID>
OR
You can select that Profile to use as a "Search View" under Advanced Search

Protect your investment in CiviCRM by  becoming a Member!

mike4miyu

  • Guest
Re: Membership number / code
May 23, 2007, 09:14:51 pm
Our org has not as yet given any membership numbers. Although we have collected memberships.

So for us it would be more useful to have the internal id as a membership no. or some other custom field that is auto generated from within civi for each new member/contact.

one problem I see with using the internal id is that it is assigned to every contact not just members. If that profile is visible on all contacts then it would appear like every contact has a membership number which would be confusing.

So, for us, it would be preferable if the membership number was generated at the time of creating a membership only.

If the id that is auto generated could also be edited then that could cater for orgs that already have membership numbers.

Generating an incremental receipt number for monetary contributions is another matter.

iana

  • Guest
Re: Membership number / code
May 27, 2007, 09:23:18 pm
Thanks Dave I can see your reasoning for using the external identifier field but we really need the membership numbers to auto increment, not just be unique.
If we use the External Identifier field the person who assigns the membership number would first have to list numbers in the field to find the next available number. This seems like unnecessary work. So I'm thinking that even though there is initial pain in the import stage (membership number to Internal contact id), the long term benefits would outweigh this.

Our fist membership number is 50, but most of the numbers start at about 38630 and the last is about 42513.  I'm not sure what is the best way to create over 42000 dummy records: cut and pasting rows in a csv file to import, or making an sql file to directly insert into the contacts table. I'm thinking that 50 is high enough for a kind of buffer so that backend users, organizations, etc. that need an id can be distinct from the member/contact numbers.  Are there any other problems with using Internal Contact ID in this way?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Membership number / code
May 29, 2007, 12:32:29 pm
I think you can force the 'next' autoincrement value to be a specific value using a SQL statement. You might want to check the MySQL documentation for how to do this (and assuming you find the solution - report it back for others here).
Protect your investment in CiviCRM by  becoming a Member!

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Membership number / code
November 24, 2007, 07:53:28 pm
FYI, the MySQL syntax for the command Dave is referring to is
Code: [Select]
ALTER TABLE table_name AUTO_INCREMENT = 100;

http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html
@xurizaemon ● www.fuzion.co.nz

brotherhutch

  • Guest
Re: Membership number / code
January 01, 2009, 06:46:29 pm
A way to generate membership numbers automatically would be an important improvement to civiCRM in my view.  I can scarcely think of an org I've been involved in that has not assigned me some sort of member number, so, as I've been setting up civiCRM for my org, I've been surprised not to find any feature that addresses auto-assigned member numbers.  However, in my org, all contacts are members, so I was thinking of using the internal ID for member numbers.  To this end, I need to have the internal ID displayed in a profile.  Here's the problem:

I created a profile with the Internal ID field as one of the viewable/searchable items.  When I do a search from the front end, I see the data for all of the fields in the profile such as name, last name, email, and Internal ID (renamed member number) in the listings; however, when I click 'view' next to a listing, and see the profile view, the Internal ID data is conspicuously absent though the label is there.  All other fields except Internal ID (member number) display properly in the profile view.

Does anyone know why this is happening and how to fix it?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Membership number / code
January 01, 2009, 07:27:20 pm

Can you reproduce this on http://sandbox.civicrm.org/ and if so, please file an issue.

We'll fix this for 2.2 and you can potentially backport to 2.1 or earlier releases

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

brotherhutch

  • Guest
Re: Membership number / code
January 03, 2009, 09:57:42 am
Yes, I did reproduce the problem in the sandbox using a profile with only the Internal ID field: it showed up in the listings but not in the profile view. Result:
(http://www3.telus.net/andersonanimal/civiIssue.PNG)

I will file an issue.

((--issue filed as CRM-3962--))
« Last Edit: January 03, 2009, 08:12:22 pm by brotherhutch »

Signals

  • I’m new here
  • *
  • Posts: 27
  • Karma: 1
  • Learning CiviCRM for future opportunities
    • Halton-Peel Hispanic Association
Re: Membership number / code
March 01, 2009, 06:20:47 pm
I saw this thread about Membership Number fields and "Auto-Increment".  Is there any word on whether this will happen in 2.2?  The site I am setting up has about 150 members with manually-assigned membership numbers but, once this goes online, they will want it auto-assigned.

It seems that many orgs have the same issue and, though I saw some sort of a MySQL script posted, I am database-illiterate and don't want to risk killing the site so I would wait for 2.2 if that solves it.

Thanks,
Matthew

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Membership number / code
March 02, 2009, 02:19:06 pm
Other than the fix below to allow you to display each contact's "contact ID" - there's no new out-of-the-box solution for this. You might want to check that out first and see if it's enough. The "internal contact ID" is displayed at the bottom of each contact summary page and can be included in profile "view".

Oh - each membership record (a contact may have one or more memberships) also has a unique ID. This # isn't currently displayed on membership screens but could be added to the templates quite easily (since the variable value is already assigned).

If these approaches doesn't work for you, there are potentially a number of tools in 2.2 which could be used  - depending on where you need - but they would require some additional relatively simple programming using a "hook". A PHP-calculated custom field added to the membership record is one idea. Let us know if you want to pursue something like that.
Protect your investment in CiviCRM by  becoming a Member!

Vera

  • Guest
Re: Membership number / code
June 06, 2009, 06:56:52 pm
Quote from: Dave Greenberg on March 02, 2009, 02:19:06 pm
If these approaches doesn't work for you, there are potentially a number of tools in 2.2 which could be used  - depending on where you need - but they would require some additional relatively simple programming using a "hook". A PHP-calculated custom field added to the membership record is one idea. Let us know if you want to pursue something like that.

This would be so very useful to us, particularly if it could be done based on search results or tag or something else that indicates 'only these contacts'. How do I follow it up and what skill does the person from my org need to have to do the simple programming? (You can already tell it's not me!)

thanks, Vera

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Membership number / code
June 07, 2009, 04:07:21 pm
Quote from: Vera on June 06, 2009, 06:56:52 pm
This would be so very useful to us, particularly if it could be done based on search results or tag or something else that indicates 'only these contacts'. How do I follow it up and what skill does the person from my org need to have to do the simple programming? (You can already tell it's not me!)

Can you explain your requirements a bit more - not sure what "it could be done based on seach results..." means? Do you only want to assign membership numbers to certain members? If so, why? Actually, I'd recommend starting a new post with detailed description of what you're currently doing and what you need in this area (inputs and outputs :-) ).
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Membership number / code

This forum was archived on 2017-11-26.