On 2007-12-20 13:15:30 -0800, Jefferis NoSpamme <jefferisp7...hotmail.com> sai
d:
> I'm having a problem with a field using zip codes for labels. If I create
> it as a text field, it will drop the zeros in front of the numbers like
> 02664 becomes 2664,
> However if I make it a number field, it will drop the - hyphen from and zi
p
> + 4 address.
> How do you work around this problem?
> ThanksThe leading zeros are only dropped in number type fields, FWIW. Text
fields retain the leading zeros if they exist in the imported data. If
you're importing from .csv or Excel files, the leading zeros may be
dropped due to Excel, not FM.
To restore the leading zeros, build a calc for the text field that
filters or replaces the imported value.
Test for length, because not all values may have the plus-four numbers.
Case(Length <= 5, Right("00000" & Zip, 5), Right("00000" & Zip, 10))
Appending the zeros and then trimming the length using the Right
function will give you what you need.
Lynn Allen
--
www.semiotics.comMember Filemaker Business Alliance
Long Beach, CA
lynnallen
| Thu, 22 May 2008 16:03:00 GMT |