Concatenate @geopoint strings into geopoint location

404
2
Jump to solution
04-26-2018 12:48 PM
Highlighted
New Contributor II

I'm trying to autopopulate a geopoint location in a Survey123 form so that the parent record passes the location to all of its children. I've successfully done this using string(${location}). However, now I'd like to add a small offset to each of the children so that they don't end up on top of each other. In order to do so, I need to pull the x and y values, add a small value to one of them, and then concatenate them back into a string for a geopoint. However, I can't seem to concatenate a string so that the geopoint can read it, and I'm stumped as to what I'm doing wrong. Both of the below attempts produce the error "Error evaluating field 'RemovalLocation': For input string: "@geopoint" Caused by java.lang.NumberFormatException: for input string "@geopoint"....9 more from Survey123 Connect.

concat(string(pulldata("@geopoint", ${locationgeo}, "y")), ' ', string(pulldata("@geopoint",${locationgeo}, "x")))

concat(pulldata("@geopoint", ${locationgeo}, "y"), ' ', pulldata("@geopoint",${locationgeo}, "x"))

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
New Contributor II

Oh, this worked:

pulldata("@geopoint", ${locationgeo}, "y")+" "+(pulldata("@geopoint", ${locationgeo}, "x")

as seen here https://community.esri.com/thread/193372-how-to-inherit-location-from-one-geopoint-to-another

View solution in original post

Reply
0 Kudos
2 Replies
Highlighted
New Contributor II

Oh, this worked:

pulldata("@geopoint", ${locationgeo}, "y")+" "+(pulldata("@geopoint", ${locationgeo}, "x")

as seen here https://community.esri.com/thread/193372-how-to-inherit-location-from-one-geopoint-to-another

View solution in original post

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Hi Carolyn,

The pulldata functions work best when they are by themselves in a question (normally type calculate) - load the values into an intermediate question and then do a calculation using the intermediate question.

Reply
0 Kudos