Passing parameters from Collector not working

1651
12
11-17-2017 06:25 AM
MichelleCassidy1
New Contributor II

Hi,

I have a feature service made up of a 'SCHEMES' line feature class (with a GLOBALID field) and a 'QUESTIONS' point feaure class (with a GUID field) and a 1:1 relationship class for them based on GLOBALID and GUID. I have published them as a service with the QUESTIONS feature class having an ID of 0 and the SCHEMES feature class having an ID of 1.

I want to be able to select a SCHEME record in ArcGIS Collector and answer questions on it, passing the GLOBALID from the SCHEMES to the GUID in the QUESTIONS. The QUESTIONS layer will be blank to begin with. I have created and published a Survey123 form using this feature service with QUESTIONS as the form_id. I have included the GUID field in the survey for the purposes of trying to get this to work.

I have created a web map and configured the pop-up for the SCHEMES to link to the Survey123 form. When I configure the pop-up to link to the survey using this URL https://survey123.arcgis.com/share/2aba41f90725456c8cd26b7535af8383, it opens the survey fine. But I want to pass the GLOBALID as the parameter. When I use this URL
https://survey123.arcgis.com/share/2aba41f90725456c8cd26b7535af8383&field:GUID=GLOBALID, I get "The survey does not exist or is not accessible".

I have tried passing a simple parameter through a web browser e.g. https://survey123.arcgis.com/share/2aba41f90725456c8cd26b7535af8383&field:CONTACT=12 and I get the same message.

Any ideas what I'm doing wrong?

Tags (2)
0 Kudos
12 Replies
MichelleCassidy1
New Contributor II

**update**

I have now got the parameter working by changing the URL from:

https://survey123.arcgis.com/share/2aba41f90725456c8cd26b7535af8383&field:GUID=GLOBALID

to:

https://survey123.arcgis.com/share/2aba41f90725456c8cd26b7535af8383?field:GUID={GLOBALID}

I am now getting the survey linked to the correct record in the related table.

However, when I access, complete and submit the survey via the web map I get a message "Object doesn't support property or method 'push'. Submit failed. When I look in the database, the record has actually committed ok.

And

When I access, complete and submit the survey via the Collector App I get a message "a.push is not a function'. Submit failed. When I look in the database, the record has actually committed ok.

What does this 'push' method refer to?

IngridAldridge1
New Contributor III

I was actually trying to figure out why my url was changing from the & to %26 when trying to pass a parameter when your post came up.  Switching fromt he % to the ? worked perfectly!  I'm not getting the object does not support issue tho.

JamesTedrick
Esri Esteemed Contributor

Hi Michelle,

The error message you describe in the web form means that there was a problem processing the form, likely around the processing of repeats or another item with multiple occurrences (push is a function in javascript that deals with arrays - sets of multiple objects).  This sounds very similar to a bug that was fixed with the 2.5 release of the website, which occurred yesterday- can you attempt to submit again and see if it still occurs?

0 Kudos
MichelleCassidy1
New Contributor II

Hi James,

Do I need to install anything to get the update? I’m still getting the same error message.

Thanks,

Michelle

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Michelle,

Could you share your XLS file so that I could try to replicate the error?

0 Kudos
MichelleCassidy1
New Contributor II

Hi James,

See attached XLS. I have a URL in Collector against a line feature class with parameters (https://survey123.arcgis.com/share/2aba41f90725456c8cd26b7535af8383?field:SCHEME_REF=&field:SCHEME_TITLE=) and this line feature class is related to a point feature class with the survey questions.

Michelle

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Michelle, 

I think something got a little altered in the text you supplied.  I don't see a field called 'SCHEME_REF' in your survey; I also don't see the values that you are passing from Collector (should be something like {Field01} after the equals sign in the URL)

0 Kudos
MichelleCassidy1
New Contributor II

Apologies James and thanks for looking at this for me. It had cut some of my text off. The URL in Collector is https://survey123.arcgis.com/share/2aba41f90725456c8cd26b7535af8383?field:SCHEME_REF={WMRF_SCHEME_REFERENCE}&field:SCHEME_TITLE={SCHEME_TITLE}

My survey has SCHEME_REF AND SCHEME_TITLE in rows 2 and 3.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Michelle,

Sorry about missing the fields in the survey.  One thing I'm noticing are those questions are read-only.  There was an issue prior to 2.5 (released on the 21st) that would not allow values to be transmitted into read only fields.  Have you updated Survey123 since you originally posted?

0 Kudos