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

1110
6
Jump to solution
02-24-2021 11:11 AM
fyang
by
New Contributor II

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
6 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 II

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 II

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 II

Yeah, I set them hidden in the beginning. :beaming_face_with_smiling_eyes:

0 Kudos