Valid if 5 digits for zip code field

I have a data field zip code that I have set to address type. Whatโ€™s the expression I need to validate that the field is 5 digits only?

Iโ€™m looking for something like: matches("[0-9]{5}"). Yes, I realize I can set it to number but Iโ€™d like to pull up the zip code on the map. Thanks in advance.

1 5 813
5 REPLIES 5

Steve
Platinum 4
Platinum 4

3X_a_c_ac61cad79978df3d7ae2b84fee43a870f58c4887.png

Valid If:

([_THIS] = RIGHT(("00000" & NUMBER([_THIS])), 5))

As I said, I have this set as type address because I need the geocoding. There is no max/min details for type address. I tried just the Valid If expression but that fails.

It dont think the data of 5 digit will not be recognized as address even we set the data type like that.

Valid If:

AND(
  (LEN([_THIS]) = 5),
  ([_THIS] = RIGHT(("00000" & NUMBER([_THIS])), 5))
)

See also:




It does. Or at least appears to. I have my address split as a combination of Street + City + Zip. I have set each field as address. I can View Map of (Street) or View Map of (City) or View Map of (Zip) in the Deck view. In the Map view I have set the combined Address as the Map column. Now when I click the View Map of (Street) in the Deck View, it shows a map with the deck. If I click View Map of (Zip) or city in the deck view, it shows me a more zoomed out map and the deck.

Top Labels in this Space