Could this work for what i am asking?
Select Case <zip> When <11233> Then <geography = "Brooklyn">
From <Main Layout>
I see no need for any scripting at all.
What you need is a relationship that matches the zip code field of your current layout's table to the zip code field of a table of zip codes and geographic areas. Do you have such a table? Do you have such a relationship?
Once you have the relationship, you can add the geographic area field from this related table and when you enter or select a zipcode in the layout's zip code field, the geographic area field from the related table will automatically display the corresponding area name.
I do have a table with the zips/area names. I hadn't thought of useing a relationship though because one "geolocation" has 45 different zip codes and I just wasn't sure how to do that. Not only that but I will also need to have 30ish of these separate geo associations using the same 2 fields. Sorry if this doesn't make sense, I am new to filemaker and am just trying to figure this out. Thank you for your response.
If "one "geolocation" has 45 different zip codes" means that you have 45 records where the zip code is different but the geolocation is the same then what I describe will work just fine.
Okay, thank you. I am going to read up on relationships between 2 tables and how to do this. Just for the sake of asking do you have any reference material you can link?
Open Manage | Database | Relationships
Drag from the zip code field in the one table to the zip code field to the other to link them in a relationship by zip code
Now click Ok to leave Manage | Database.
Enter layout mode.
Use the field tool or the field picker to add the Geolocation field from the table of zip codes and areas to your layout where you enter the zip code.
For more info, you might read this: Auto Fill
The same info can be found if you download Adventures In FileMaking #2 - Enhanced Value Selection, click the button for "Auto-Filtering Search Portals" and then click the "Look up or Link?" button.
OK so using a relationship been l between my 2 tables and lookups I got the function to work perfectly.
my next question would be how can I make this retroactive?
I would like my new geographic regions to apply to all existing zip codes in each of my contacts files.
And why isn't it retroactive? The relationship will match on all records in the two tables whether new or old so you'll need to explain the new issue a bit more.
for some reason it would only apply to new entries. I had to run a "relookup" script for this to retroactively apply.
And that post supplies the missing info. There is more than one way to use a relationship link. If you are using an auto-enter field option such as a looked up value or auto-entered calculation, pre-existing records won't automatically update. Re-lookup works for looked up value field options. Replace Field Contents can update auto-entered calc fields.
But you can also use other methods that dynamically link to the data instead of copying it from the look up table. Which is best depends on the way you need to work with this data.
See this thread: Auto Fill