Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Importing zip codes from Excel with leading zeros

Featured Replies

  • Newbies

I've searched through the archives and have found a number of discussions about EXPORTING zip codes with leading zeros from FM6, but none on importing. How do you import zip code data that is formatted in Excel 2001 as "Special-Zip" and retain the zero in FM?

Thanks,

Frank Lennon

In general, the answer is to import the zip data as text rather than number data. Text fields do not 'interpret' the incoming information - leading zeros included, so that will resolve the FileMaker end of the equation. As long as you can get Excel to output the leading zeros, a FileMaker text field will receive them.

Alternatively, you would be able to bring the data in and then restore the zeros afterwards using a replace with calculated result option, and a formula along the lines of:

Right(10^(n - Length(ZipCode)), (n - Length(ZipCode))) & ZipCode

where 'n' is the desired length of the zip codes, including the leading zeros. This formula will add zeros as required, but will not truncate a zip code if the existing data is of n or greater length. Moreover a 'Replace Contents' procedure using such a formula will be effective regardless of whether the target field is defined as a text or number field.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.