Canadian Postal Code not pulled in web browser as Geocoding reverse function

2412
7
Jump to solution
02-24-2021 11:11 AM
fyang
by
New Contributor III

Hi,

Canadian postal code format is A1B 2C3. As survey 123 geocoding reverse result, we only got the first 3 characters as "reversegeocode.address.Postal". While we get the last 3 characters from "reversegeocode.address.PostalExt".

So I merged these two into one as:

pulldata("@geopoint",${location},"reversegeocode.address.Postal") + pulldata("@geopoint",${location},"reversegeocode.address.PostalExt")

It works in Survey 123 connect:

fyang_0-1614193738082.png

But it doesn't works in web browser.

fyang_1-1614193783439.png

 

If I only have postal code, it works but only show the first 3 characters.

 

Any clue? Thanks!

Fan

0 Kudos
2 Solutions

Accepted Solutions
KerryKang
Occasional Contributor II

Hi Fan, 

 

Try to create two null questions and each of them calculate first 3 code and the rest of 3 code. Then use 'concat' to put them together as calculate in postal code question.

E.g.Name, Calculate, Esri field type

postal_123, pulldata("@geopoint",${location},"reversegeocode.address.Postal"), null

postal_456,pulldata("@geopoint",${location},"reversegeocode.address.PostalExt"), null

 

postal_code, concat(${postal_123}, ' ', ${postal_456}).

 

Kerry

View solution in original post

0 Kudos
KerryKang
Occasional Contributor II

If you set Esri Field Type as null, it does not create additional fields in the actual dataset, but does work/exist within only Survey123 form. It's tricky to make both field form and web form works.. Hope you can find a solution! I am in Canada so I will be interesting how it works eventually. 🙂

 

Kerry

 

 

View solution in original post

0 Kudos
7 Replies
KerryKang
Occasional Contributor II

Hi Fan, 

 

Try to create two null questions and each of them calculate first 3 code and the rest of 3 code. Then use 'concat' to put them together as calculate in postal code question.

E.g.Name, Calculate, Esri field type

postal_123, pulldata("@geopoint",${location},"reversegeocode.address.Postal"), null

postal_456,pulldata("@geopoint",${location},"reversegeocode.address.PostalExt"), null

 

postal_code, concat(${postal_123}, ' ', ${postal_456}).

 

Kerry

0 Kudos
fyang
by
New Contributor III

Thanks Kerry!

 

But we are using a standard data model (shared with other applications) so cannot create extra field for that. I know extra fields calculation is a work around method. But I'm seeking a direct solution base on existing field calculation.

Thanks for your advise!

0 Kudos
KerryKang
Occasional Contributor II

If you set Esri Field Type as null, it does not create additional fields in the actual dataset, but does work/exist within only Survey123 form. It's tricky to make both field form and web form works.. Hope you can find a solution! I am in Canada so I will be interesting how it works eventually. 🙂

 

Kerry

 

 

0 Kudos
fyang
by
New Contributor III

Thanks Kerry!

That works!

0 Kudos
KerryKang
Occasional Contributor II

That's great! One more tip, after you publish the survey, you can change the type of two additional question to 'hidden' (I assume you used 'text'), the re-publish it. Then they won't be displayed for end users.

Kerry

0 Kudos
fyang
by
New Contributor III

Yeah, I set them hidden in the beginning. 😁

0 Kudos
parceltracking
New Contributor

The issue of the Canadian postal code not being pulled in a web browser as a Geocoding reverse function can occur due to several factors. Here are some potential reasons and solutions:

1. Incorrect Format:

  • Ensure the postal code is entered correctly in the format A1A 1A1, including spaces. Double-check for any typos or extra characters.

2. Geocoding Service Limitations:

  • Some Geocoding services might not support Canadian postal codes natively. Check the documentation of the specific service you're using to confirm its capabilities.
  • Certain platforms might require additional parameters or specific API settings to handle Canadian postal codes accurately.

3. Privacy Restrictions:

  • Some governments, including Canada, have privacy regulations around geocoding that may limit access to precise location data based on postal codes. This could explain why you're only getting basic information like city or province instead of exact coordinates.

4. Data Quality or Coverage:

  • The Geocoding service's data might not be comprehensive or updated enough to recognize all Canadian postal codes, especially for remote areas or newly created codes.

Potential Solutions:

  • Use a reputable Geocoding service known for its support of Canadian postal codes, such as Google Maps API or OpenStreetMap Nominatim.
  • If specific API settings are required, consult the service's documentation for proper configuration.
  • Consider alternative methods like searching by the full address or using a combination of postal code and city/province.
  • Remember that due to privacy regulations, you might not always get exact street-level details but rather broader location information.

For more specific help, please provide additional details about:

  • The web browser or platform you're using.
  • The specific Geocoding service you're trying to utilize.
  • The exact error message or behavior you're encountering.

i have solved this issue on my website canada postal code 

0 Kudos