Answers.Body: <p>I just ran into this very same issue today. I need to create/generate External IDs: First two digits of First Name + First two digits of Last Name + Date of Birth -> so e.g. COCR16091970</p>
  
  <p>This is easily generated with some Javascript on an Intake Webform CiviCRM form. It can however not be passed into a View and does not want to store in CiviCRM as it does not get submitted - likely on purpose because of the reasons/words of caution above by Xavier. </p>
  
  <p>The only solution is to Create a Custom Data Set/ Field -> myID - populate that with Javascript to generate unique IDs like COCR16091970 and then you can do what you want to do and store it in CiviCRM. I think that's the easier and safer way to do it. If we were to make Edits to Webform CiviCRM to allow External Identifier to be written to CiviCRM from a Webform it would be easy for admins to unintentionally create issues for down the road.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-19T00:50:25.190Z
Answers.LastActivityDate: 2019-02-19T01:00:04.813Z
Answers.LastEditDate: 2019-02-19T01:00:04.813Z
Answers.UserDisplayName: KarinG - Semper IT
Answers.Body: <p>so your aim is to let the end user change the external id directly? </p>
  
  <p>It has several constraints (eg. it has to be unique) that made me wonder if you wouldn't be safer to create a custom field to store whatever you intend to put into the external id.</p>
  
  <p>External id is a fairly technical field that I would not expose directly to the user, both to avoid consistency problems and privacy leakage.</p>
  
  <p>Eg. if you are using it to store the id from another system (say a membership id), it would be fairly easy to check if a specific member id is already registered in the database: try to create or update the webform with that id. If you have an error, it means the id is already registered in the database.</p>
  
  <p>With a custom field, you wouldn't have that constraint of being unique.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-04T14:13:40.233Z
Answers.Text: +1 for this. We have 8 external IDs for our contacts (yes, 8) and we use custom fields to store them rather than using CiviCRM's built in External ID field which has some limitations.
Answers.UserDisplayName: John
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-09T02:45:06.883Z
Answers.Text: The aim is to let the user assign the external id directly. I do need it to be unique so that is why it's not created as a custom field right now.
Answers.UserDisplayName: Kristine
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-29T10:43:03.973Z
Answers.LastActivityDate: 2015-07-29T10:43:03.973Z
Answers.UserDisplayName: Xavier
Body: <p>On the CiviCRM Webform Integration, I setup the External ID to appear as a textfield. Once the form is submitted, the External ID is captured in Webform, but not in the CiviCRM contacts. Is this a bug or is my settings incorrect?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-29T20:11:00.247Z
Comments.Text: Please clarify your use case of External ID. It is mostly used to hold the ID from another DB such as a legacy system where the data was imported in to civicrm, or an external id where synching between the data sets is ongoing.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-09T02:43:13.867Z
Comments.Text: I use external IDs as a way to assign a unique value to each contact. Therefore, there should be no duplicate IDs in Civi. The problem I have is that the Webform component isn't sending the text entered into the External ID field in CiviCRM.
Comments.UserDisplayName: Kristine
Tags: <webform-civicrm><external-id>
Title: How do I get the External ID to appear in my contacts through Webform?
ThreadText: # How do I get the External ID to appear in my contacts through Webform?
  
  (Asked by: username_0 on 2015-07-29)
  
  On the CiviCRM Webform Integration, I setup the External ID to appear as a textfield. Once the form is submitted, the External ID is captured in Webform, but not in the CiviCRM contacts. Is this a bug or is my settings incorrect?
  
  **Tags:** webform-civicrm, external-id
  
  > **Comments:**
  > **username_1**: Please clarify your use case of External ID. It is mostly used to hold the ID from another DB such as a legacy system where the data was imported in to civicrm, or an external id where synching between the data sets is ongoing.  
  > **username_0**: I use external IDs as a way to assign a unique value to each contact. Therefore, there should be no duplicate IDs in Civi. The problem I have is that the Webform component isn't sending the text entered into the External ID field in CiviCRM.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2019-02-19. Score: 1 | Accepted answer
  
  I just ran into this very same issue today. I need to create/generate External IDs: First two digits of First Name + First two digits of Last Name + Date of Birth -> so e.g. COCR16091970
  
  This is easily generated with some Javascript on an Intake Webform CiviCRM form. It can however not be passed into a View and does not want to store in CiviCRM as it does not get submitted - likely on purpose because of the reasons/words of caution above by username_3.
  
  The only solution is to Create a Custom Data Set/ Field -> myID - populate that with Javascript to generate unique IDs like COCR16091970 and then you can do what you want to do and store it in CiviCRM. I think that's the easier and safer way to do it. If we were to make Edits to Webform CiviCRM to allow External Identifier to be written to CiviCRM from a Webform it would be easy for admins to unintentionally create issues for down the road.
  
  
  ---
  
  ### Answer by username_3 on 2015-07-29. Score: 5
  
  so your aim is to let the end user change the external id directly?
  
  It has several constraints (eg. it has to be unique) that made me wonder if you wouldn't be safer to create a custom field to store whatever you intend to put into the external id.
  
  External id is a fairly technical field that I would not expose directly to the user, both to avoid consistency problems and privacy leakage.
  
  Eg. if you are using it to store the id from another system (say a membership id), it would be fairly easy to check if a specific member id is already registered in the database: try to create or update the webform with that id. If you have an error, it means the id is already registered in the database.
  
  With a custom field, you wouldn't have that constraint of being unique.
  
  > **Comments:**
  > **username_4**: +1 for this. We have 8 external IDs for our contacts (yes, 8) and we use custom fields to store them rather than using CiviCRM's built in External ID field which has some limitations.  
  > **username_0**: The aim is to let the user assign the external id directly. I do need it to be unique so that is why it's not created as a custom field right now.  
  
  ---
  
  