Address Validation

I have an Address column and I want to make sure that the user selects the proposed address. Many times it takes time for the proposed address to appear and the user saves an address that is not later represented on the map.
I think there must surely be a Valid If to verify that a LatLong exists or that a valid address was selected.
How should I do it?

HI, I’m afraid we don’t have mechanism that could check if the address or Latlong is valid with the Valid If because we don’t know what values we should evaluate.

1 Like

Hi @Aleksi
I am not referring to validating that the location is correct, but to preventing the user from sending an unrecognized address.
In the image the recognized address includes City and Country, while the one entered by the user does not. The idea is that if the user did not select a proposed address, or did not write it in a recognizable way, it will return a validation error and present a validation error explaining to the user that they must select one of the proposed addresses or write it completely.

In generaly speaking, I mean the same. It’s impossible to check if the syntax is correct because there isn’t anything that you could check. For example you can’t check in real life that the street name is correct… you would need to have all street names, cities, countries in your app so you could check them… and still it’s possible that the address is not valid.

From my point of view, if an address can be represented on the map, it is valid.
And as far as I am concerned, it would be enough for me to be able to check if the address matches any of the proposals, or simply to know if the user selected a proposed address.
The idea is to avoid typing errors and incomplete data that lead to addresses not shown on the map.

@TalkNet_TechnoStore you could create an “Addresses” table and use references instead of actually entering the address.

This would give you a way to validate (and keep for easy use later) any addresses that are added to your system.

To implement this, I wouldn’t change anything you have right now but instead ADD a new column to serve as this reference - then update the address columns to use a de-reference to pull the address from the one selected in the reference column.

This does, however, bring in an additional layer of complexity.

Yes and that’s the problem. If the user closes the form before the address is downloaded from Google Map, there isn’t anything that you could use for the validation.

That is exactly what I meant, that the user cannot close the form until they have the data from Google Maps and without having selected one!
So I thought it was a simple thing to do, but I see that it is not possible.
Anyway thank you very much as always !!!

The problem is even Google doesn’t always know if its a valid address. If your street number is 8725 and your neighbor is 8735, then 8727 is technically a valid address. It just doesn’t belong to anyone. So its really the conundrum of a technically valid address vs actually having said address attached to an actual place. Services for that exist, but AppSheet would likely have to charge more if they included this functionality directly.

I have found this: You get 250 requests per month for free. It will not only validate, but fill in missing info as well. Up to you too figure out how to use it with your app.

1 Like

There is an alternative approach, though maybe not considered a good one. It will always give you a pin-able address.

You could start with the Map. If the data shown is update-able you will get this icon in the bottom right.

Screen Shot 2020-04-08 at 2.20.19 PM

Tapping it gives you a moveable pin that when moved to a location will show the corresponding address like so:

Screen Shot 2020-04-08 at 2.20.45 PM

And also gives you this icon now in the bottom right

Screen Shot 2020-04-08 at 2.20.54 PM

Tapping the check mark then takes you to the entry Form with the address pre-filled

1 Like