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.

Case Question

Featured Replies

I am trying to write a script that will automatically enter the county name in the "County" Field, when I enter a zip code in the "zip code" field.

There are about 460 or so zip codes, and 32 counties. I have tried to use Case, but after I get past a certain number (not exactly sure how many), I get an error that says "There are too many separators in this function",

Any suggestions?

Thank you!

"...too many separators..." simply means you have an extra comma somewhere in your calculation. But why make it so hard on yourself? Just make a Counties file with 2 fields, zip and county, and use this file for a lookup from your main database. You wouldn't even need a script!

  • Author

Hmm, the new file idea seems perfect, and I will probably try that, and I agree with what you say the "too many separators" error is telling me, but I only get the error after I continue to add portions to the case function, and then, the error always highlights back toward the beginning of the script where I have already test saved the calculation, and it highlights a part of the calculation where no error is visible. So I think in this case it has to do with too many entries in the case function, but I'm not sure.

Not sure if this still applies:

FileMaker Pro 3.0, 4.0, 4.1

There is a maximum of 168 nests allowed in a single IF or CASE statement.

In any case (haha), you'd be insane to do this as a calculation when a lookup file is SOOOO much easier. It's also far easier to maintain, although I don't suppose counties change often. But new zip codes do come along now and then, and it's a snap to add a new record to a counties/zips database. In fact, I bet you could probably find one already done if you poke around a little. Sorry I don't have time right now to search.

DEFINITELY go the lookup route. Its also much easier when you need to update your zip code database. In the land of Oz, Australia Post has a website from which you can download all the postcodes so its easy to keep up-to-date. I assume there would be something similar over your way.

Russ Baker

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.