Answers.Body: <p>Do you want a membership number, or a number for members.</p>
  
  <p>Each membership in civicrm has an Membership ID associated with it (Used for linking fees paid to the memberships) Perhaps you could use that as your member number.  </p>
  
  <p>There are two downsides to that:</p>
  
  <ul>
  <li>It is not readily visible or searchable - some customisation would be required. (When you edit a membership the URL is something like <a href="http://dmaster.demo.civicrm.org/civicrm/contact/view/membership?action=update&amp;reset=1&amp;cid=2&amp;id=3&amp;context=membership&amp;selectedChild=member" rel="nofollow">http://dmaster.demo.civicrm.org/civicrm/contact/view/membership?action=update&amp;reset=1&amp;cid=2&amp;id=3&amp;context=membership&amp;selectedChild=member</a> . "&amp;id=3" tells you that the membership_Id is 3)</li>
  <li>If someone has two membership there will be a membership ID for each membership.  Which one would be their member number? (This might not apply for your organisation, but will for some.)</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-05T12:23:57.240Z
Answers.Text: I doubt any member will have more than one membership so I don't think that is an issue, so long as members can keep the same number when they renew. However, staff do need to be able to see the membership number.  How do you view the Membership ID?
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-05T14:15:14.930Z
Answers.Text: I have edited answer to explain how you can find it.  As I said it isn't readily visible which is why you would need some customisation (which I can't advise on).
Answers.UserDisplayName: JoAnne
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-05T14:30:04.827Z
Answers.Text: Thanks.  If staff can't view the Membership ID through the user interface then it isn't really an option.
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-05T15:51:56.927Z
Answers.Text: To display the Member Id is not difficult, you could use `hook_civicrm_contact_get_displayname` to append the ID to the name in the Contact Summary, see gist and screenshot here: https://gist.github.com/mecachisenros/785d9d8eef15359b4f66a332406b7b0e Or you can use `hook_civicrm_searchColumns` to add a new column to the Membership Tab and display it there. As for searching by Member ID, I guess you would have to create a Custom Search.
Answers.UserDisplayName: Andrei
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-05T18:40:33.087Z
Answers.Text: In drupal you could drop a block in to the sidebar to show the Membership ID if the contact has one but from memory you need a bit of php to pull the cid out of the url and use as the contextual filter in the block
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-05T12:00:16.873Z
Answers.LastActivityDate: 2016-04-05T14:15:08.993Z
Answers.LastEditDate: 2016-04-05T14:15:08.993Z
Answers.UserDisplayName: JoAnne
Answers.Body: <p>I'm not sure whether it would be any use to you but there is a CiviCRM Core  Extension called "Custom Membership ID" by Grant Traynor which is at the following link <a href="https://civicrm.org/extensions/custom-membership-id" rel="nofollow">Custom Membership ID</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-06T17:06:12.743Z
Answers.Text: Yes, I saw that.  Have you used it yourself?
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-07T20:35:01.193Z
Answers.Text: Hi William.  No I haven't used it myself.  When we started to use CiviCRM, we imported an old membership system and retained the old sequential membership numbers in a custom field.  At the moment we are updating those numbers manually as and when a new member joins up.  It hasn't really been a problem but of course it is extra work.  We have thought about just using the Membership ID as the membership number but we haven't got around to it yet.
Answers.UserDisplayName: peterb
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-06T14:42:20.907Z
Answers.LastActivityDate: 2016-04-06T14:42:20.907Z
Answers.UserDisplayName: peterb
Answers.Body: <p>Grants extension &quot;Custom Membership ID&quot; isn't working with up-to-date CiviCRM (5.36).</p>
  <p>If you like a view of the Membership ID (and type), please install the extension &quot;Display MemberID&quot; from <a href="https://civicrm.org/extensions/show-member-ids" rel="nofollow noreferrer">https://civicrm.org/extensions/show-member-ids</a> It shows the ID in Contact Summary (next to contact ID) and in Memberships.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-21T16:35:45.627Z
Answers.LastActivityDate: 2021-04-21T16:35:45.627Z
Answers.UserDisplayName: wintermoor
Body: <p>Is there a way to automatically create membership numbers for members?</p>
  
  <p>There is the CiviCRM ID but this applies to all contacts, not just members.  I'm looking for a way to create a number that only applies to members.</p>
  
  <p>This question was asked a few years ago on the forums (<a href="https://forum.civicrm.org/index.php?topic=223.0" rel="nofollow">Membership number/code</a>) but I wonder if there have been any developments since then.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-05T14:18:23.340Z
Comments.Text: Why do you want the number only to apply to members? We use the contact ID very successfully as a membership number.  One glance at the summary screen for the contact tells you if they are a member or not.
Comments.UserDisplayName: JoAnne
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-05T14:36:55.250Z
Comments.Text: The CiviCRM ID is an option but it isn't ideal for a number of reasons: it doesn't identify the contact as a member (since all contacts have this ID), membership numbers won't be sequential and will increase more rapidly than actual number of members (membership is small compared with the overall number of contacts).
Comments.UserDisplayName: William Mortada
Tags: <civimember>
Title: How can I create a membership number?
ThreadText: # How can I create a membership number?
  
  (Asked by: username_0 on 2016-04-05)
  
  Is there a way to automatically create membership numbers for members?
  
  There is the CiviCRM ID but this applies to all contacts, not just members. I'm looking for a way to create a number that only applies to members.
  
  This question was asked a few years ago on the forums ([Membership number/code](https://forum.civicrm.org/index.php?topic=223.0)) but I wonder if there have been any developments since then.
  
  **Tags:** civimember
  
  > **Comments:**
  > **username_1**: Why do you want the number only to apply to members? We use the contact ID very successfully as a membership number.  One glance at the summary screen for the contact tells you if they are a member or not.  
  > **username_0**: The CiviCRM ID is an option but it isn't ideal for a number of reasons: it doesn't identify the contact as a member (since all contacts have this ID), membership numbers won't be sequential and will increase more rapidly than actual number of members (membership is small compared with the overall number of contacts).  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2016-04-05. Score: 2 | Accepted answer
  
  Do you want a membership number, or a number for members.
  
  Each membership in civicrm has an Membership ID associated with it (Used for linking fees paid to the memberships) Perhaps you could use that as your member number.
  
  There are two downsides to that:
  
  * It is not readily visible or searchable - some customisation would be required. (When you edit a membership the URL is something like <http://dmaster.demo.civicrm.org/civicrm/contact/view/membership?action=update&reset=1&cid=2&id=3&context=membership&selectedChild=member> . "&id=3" tells you that the membership\_Id is 3)
  * If someone has two membership there will be a membership ID for each membership. Which one would be their member number? (This might not apply for your organisation, but will for some.)
  
  > **Comments:**
  > **username_0**: I doubt any member will have more than one membership so I don't think that is an issue, so long as members can keep the same number when they renew. However, staff do need to be able to see the membership number.  How do you view the Membership ID?  
  > **username_1**: I have edited answer to explain how you can find it.  As I said it isn't readily visible which is why you would need some customisation (which I can't advise on).  
  > **username_0**: Thanks.  If staff can't view the Membership ID through the user interface then it isn't really an option.  
  > **username_2**: To display the Member Id is not difficult, you could use `hook_civicrm_contact_get_displayname` to append the ID to the name in the Contact Summary, see gist and screenshot here: https://gist.github.com/mecachisenros/785d9d8eef15359b4f66a332406b7b0e Or you can use `hook_civicrm_searchColumns` to add a new column to the Membership Tab and display it there. As for searching by Member ID, I guess you would have to create a Custom Search.  
  > **username_3**: In drupal you could drop a block in to the sidebar to show the Membership ID if the contact has one but from memory you need a bit of php to pull the cid out of the url and use as the contextual filter in the block  
  
  ---
  
  ### Answer by username_4 on 2016-04-06. Score: 3
  
  I'm not sure whether it would be any use to you but there is a CiviCRM Core Extension called "Custom Membership ID" by Grant Traynor which is at the following link [Custom Membership ID](https://civicrm.org/extensions/custom-membership-id)
  
  > **Comments:**
  > **username_0**: Yes, I saw that.  Have you used it yourself?  
  > **username_4**: Hi username_0.  No I haven't used it myself.  When we started to use CiviCRM, we imported an old membership system and retained the old sequential membership numbers in a custom field.  At the moment we are updating those numbers manually as and when a new member joins up.  It hasn't really been a problem but of course it is extra work.  We have thought about just using the Membership ID as the membership number but we haven't got around to it yet.  
  
  ---
  
  ### Answer by username_5 on 2021-04-21. Score: 1
  
  Grants extension "Custom Membership ID" isn't working with up-to-date CiviCRM (5.36).
  
  If you like a view of the Membership ID (and type), please install the extension "Display MemberID" from <https://civicrm.org/extensions/show-member-ids> It shows the ID in Contact Summary (next to contact ID) and in Memberships.
  
  
  ---
  
  