3

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?

  • 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. – petednz - fuzion Jul 29 '15 at 20:11
  • 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. – Kristine Aug 9 '15 at 2:43
4

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.

  • +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. – John Aug 4 '15 at 14:13
  • 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. – Kristine Aug 9 '15 at 2:45
1

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 Xavier.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.