AnsweredAssumed Answered

ZipCode Lookup Not Working As Expected/Wanted

Question asked by MorkAfur on May 22, 2015
Latest reply on May 22, 2015 by MorkAfur

Title

ZipCode Lookup Not Working As Expected/Wanted

Post

I’m trying to pre-populate the zipcode field using the possible values from the ZIPCODES table.

Yet, FileMaker refuses to go along saying that I can only use a global field for unrelated fields.

Huh?

This is just a lookup table, NOT a related table. I’m just trying to set a variable in the script dialog. I don’t want to (nor should I) relate the customer’s zip code to the ZIPCODES lookup table.

Here’s the exceedingly simple SQL:

ExecuteSQL ( "select zipcode, city, state from ZIPCODES where state = ? and UPPER(City) = ?" ;""; ""; ZIPCODES::State; Upper(ZIPCODES::City) )

Clearly, I don’t want to use a global field for customer zip codes.

Why won’t filemaker let me execute this SQL?

The query works fine from the JDBC client I always use to work with SQL in FM. (Example that proceeds 85 zip codes: “select zipcode, city, state from ZIPCODES where state = 'CA' and UPPER(city)= 'SAN DIEGO’”).

Thanks in advance for suggestions.

- m

error.jpg

Outcomes