Forum Discussion
QuickBaseCoachD
7 years agoQrew Captain
You can make a text formula field like this
Right("0000" & totext([my numeric zip code field]),5)
that will change a numeric field like
1234
to be 01234
But I do not know what logic would be used to make a zip code shorter. can you give an example of the data you are dealing with and if the field is text or numeric?
Right("0000" & totext([my numeric zip code field]),5)
that will change a numeric field like
1234
to be 01234
But I do not know what logic would be used to make a zip code shorter. can you give an example of the data you are dealing with and if the field is text or numeric?
GeorgeGeorge
7 years agoQrew Cadet
Mark, thank you!! for your help. I used your formula but in reverse order. (because many of the zip codes where Zip + 4 --- so I had to approach from the LEFT.
Formula I used
If([ZipZeroState]=true and Begins([ShipTo_Zip],"0"), Left([ShipTo_Zip],5),If([ZipZeroState]=true, Left("0" & [ShipTo_Zip],5),Left([ShipTo_Zip],5))
[ZipZeroState] Case([ShipTo_State],"CT",true,"NJ",true,"MA",true,"ME",true,"NH",true,"PR",true,"RI",true,"VT",true,"AE",true,false)
Thank you again
Formula I used
If([ZipZeroState]=true and Begins([ShipTo_Zip],"0"), Left([ShipTo_Zip],5),If([ZipZeroState]=true, Left("0" & [ShipTo_Zip],5),Left([ShipTo_Zip],5))
[ZipZeroState] Case([ShipTo_State],"CT",true,"NJ",true,"MA",true,"ME",true,"NH",true,"PR",true,"RI",true,"VT",true,"AE",true,false)
Thank you again