Migrating the Province/State and Postal/Zip Code Fields

Prior to version 3.9.16, the learning environment was not collecting the province/state and postal/zip code information of users. These fields were only being collected via custom user profile fields. Starting with the release of 3.9.16.2, these fields are now part of the core database.

As part of the update, these fields now appear in your learning environment. But if you were previously collecting these fields using custom user profile fields, the information has not been migrated (or "copied") from the custom field to the new / regular field. You can however easily migrate the information yourselves.

Step-by-step Guide

To migrate the data from custom user profile fields to the new province/state and/or postalzipcode fields:

  1. Export the user information to a CSV file using bulk user actions or a custom report.

    1. Note that custom reports only export a maximum of 5,000 users, so if you have more than 5,000 users, the recommendation is to use bulk user actions.

  2. Delete all column with the exception of a unique identifier (preferably "username") and your custom user profile fields that currently store the province/state and postal/zip codes. (The name of the columns depend on how you named them and vary for each client.)

  3. Replace the header (first row) of your CSV to reflect the field names: "provincestate" and "postalzipcode"

  4. Modify the values stored in the CSV file for these columns to ensure they are valid.

    1. The province/state field needs to respect the ISO-3166-2 standard. So if your CSV is displaying "Ontario", you must change it to "ON", which is the two-letter code for the province of Ontario.

    2. The postal/zip code can most likely remain as is because the new postalzipcode accepts any text.

Once your CSV is ready, you should have three columns as per the following:

username,provincestate,postalzipcode
jsmith,ON,K2K 2E2
jdoe,QC,J8L 0A6

You can now update the user information by following the Uploading Users step-by-step guide.



Once the above is done (or before), you may want to stop collecting information in the custom user profile fields.

  • If the fields are being populated by an administrator or a 3rd party system such as Active Directory or an HRIS, it may be safe to delete the custom user profile fields where province/state and postal/zip code was being stored. But only after the integration between the 3rd party system and learning environment has been updated to now populate the core province/state and/or postalzipcode fields.

  • If the fields need to be displayed on the self-registration page so that the users can specify their own region when they self-register, the fields should be deleted and replaced by "associated input" fields as per the Designing a Self-Registration Form article.

Related Articles