Relevant note when incorrect address is entered

532
4
Jump to solution
01-25-2024 11:16 AM
MikhaylaB
Occasional Contributor

I have a form for customers to request a service at their address, but we do not want to provide this service to a specific address. How can I generate a note or prohibit the survey's submission if that one address is entered?

 

The code in the linked image is just my attempt at a guess, but I updated the ${bannedAddress} to ${Address} to match the geocoded address field.

 

 

 

0 Kudos
1 Solution

Accepted Solutions
JenniferAcunto
Esri Regular Contributor

I would use the pulldata function (as outlined in this blog) to grab the searched for address information and apply that to your note and/or a constraint. See the attached sample XLS.

- Jen

View solution in original post

0 Kudos
4 Replies
JenniferAcunto
Esri Regular Contributor

I would use the pulldata function (as outlined in this blog) to grab the searched for address information and apply that to your note and/or a constraint. See the attached sample XLS.

- Jen
0 Kudos
MikhaylaB
Occasional Contributor

I got this to work, thanks 🙂 

0 Kudos
abureaux
MVP Regular Contributor

The issue you may run into is that "24 Restricted Street" and "24 Restricted St" are different things. All it takes is an abbreviation, extra dash, or random space and you have a different text string.

Is it just a single address/location you want to restrict? Or more like, "this neighbourhood is dangerous, so we don't service there"? If it's just a single address, that may be hard (mainly because side-stepping that address by a few meters would work). But if we are talking a slightly larger region, I'd suggest something like:

  1. Determine your "restricted zone" in the form of a polygon.
  2. Use a geocoding service (as @JenniferAcunto referenced below) and extract your location
  3. Compare your location to your "restricted zone", and if the point falls within that polygon, return "no can do!"

Basically, you'd be wanting to do the reverse of this.

0 Kudos
MikhaylaB
Occasional Contributor

It is just a single address, but it is technically a whole string of townhomes. I can see what you're saying with slight variations to the address posing an issue. I imagine they have unit numbers that would be problematic in this instance.

0 Kudos