Select to view content in your preferred language

Can't pass attributes of a line from Collector to S123

4003
12
03-30-2020 10:05 AM
CesarAvila
New Contributor II

Hi. 

Basically here is the worflow:

From collector app, select one of the lines (see 1st screenshot). In the pop out window from collector there is a link that will open a survey in S123. Once the app is open, in the survey there are attributes passed from Collector but doesn't fill out the "Polyline" (see 2nd screenshot). It's possible to "pass" the line attribute from Collector to the "Polyline" in S123? I just put it like a "geotrace", but basically what I want is to "draw" that geotrace line from collector to s123.

collectorSurvey123 for

 

Thanks!

Tags (1)
12 Replies
MEGAAdmin_E
New Contributor

Matt when I run this lines it works perfectly, any chance you have done this for Polygons?

0 Kudos
JamieLambert
Occasional Contributor III

Hi @BrettStokes ,

Just went through the workflow for the polygon example, and worked perfectly in Map Viewer Classic, though not in Map Viewer. The expression gives the same result when testing in both, though the URL does not work correctly in Map Viewer. In the pop-up, all coordinates are displayed, and only the first latitude value is passed to Survey123.

PassPolyStrToSurvey123.png

Cheers,

Jamie.

0 Kudos
HayesBuchanan
New Contributor II

Hey @BrettStokes @MEGAAdmin_E @JamieLambert ,

I'm also struggling with using this code for polygons. When I follow Brett's polygon code it successfully links to Survey123, but the resulting geometry is simply a line (pictured). I also tried nesting his code inside a urlencode snippet...

var geom = Geometry($feature);

var firstpart = geom.rings[0];

var outparts = [];

var counter = 0;

for (var pt in firstpart){

    var ptstr = Concatenate(firstpart[pt].y, " ", firstpart[pt].x);

    outparts[counter]= ptstr;

    counter = counter + 1;   

}

var result = Concatenate(outparts, ";")
return UrlEncode(result);

but this resulted in no geometry making its way into Survey123 at all. 

Use of MapView or MapViewer Classic doesn't make any difference.

Would love to make some progress on this! Thanks

0 Kudos