Geopoint placed from pulled choice list selection

935
8
Jump to solution
05-17-2021 03:24 PM
AndrewPriest
New Contributor II

Hi. Forgive me, I've seen threads with a similar question, however I'm still struggling. I'm on Survey123  3.12 and the survey if primarily accessed via a web browser. here's the gist of it.

Survey question:

Is this in a building?

If yes is selected a .CSV of building names, numbers, and it's location gets pulled:

pulldata('Building_pt_PH','BuildingNumber','Name_Building', ${BuildingNumber})

That .CSV also contains a location field in "+37.75722499_-122.4556317" format.

I want the geopoint to center at the location of the building selected.

If no is selected I want the normal geopoint behavior of the user clicking the location.

I know this is pretty basic stuff. I just can't get it functioning correctly. Thanks.

 

 

 

 

 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Notable Contributor

Here you are.  I just followed the screen shot in the post so not sure what did not work for you.  I had to change the csv also since you had no name or label columns.  Need these for the Building name to populate.

View solution in original post

8 Replies
DougBrowning
MVP Notable Contributor
0 Kudos
AndrewPriest
New Contributor II

thanks, yeah, I looked at that and I'm still flummoxed. the "Lookup search against a local file" section is basically what I'm trying to do, but it's actually even more complicated with the concat Lat/Long calculation.

I've just need to pull one X_Y value based on a choice list calculation

0 Kudos
DougBrowning
MVP Notable Contributor

Based on the sample I think you need to use 2 columns.  No real way to sperate strings in 123.

So have a lat column and a long column and pull them separately.  Then use them in the calc of the geopoint.  Just follow the image and it should work.

If you can post your form that will help.

0 Kudos
AndrewPriest
New Contributor II

thanks, Doug. I've attached my form. my media folder contains the"Building_pt_PH.csv" which has the building name, unique identifier (CAAN), and the lat/lons. I'm hoping to get the geopoint to center on the lat/longs of the CAAN selected. Cheers

0 Kudos
DougBrowning
MVP Notable Contributor

Attach the CSV also

0 Kudos
AndrewPriest
New Contributor II

right! thanks again, Doug. attached

0 Kudos
DougBrowning
MVP Notable Contributor

Here you are.  I just followed the screen shot in the post so not sure what did not work for you.  I had to change the csv also since you had no name or label columns.  Need these for the Building name to populate.

AndrewPriest
New Contributor II

that did it! thanks again

0 Kudos