Passing values from Collector to Survey123 won't work only on iPad.

2159
5
09-18-2017 12:15 PM
BrettHorr
New Contributor III

Hi folks,

I am working on integrating Collector v.17.0.2 and Survey123 v. 2.3.29 for a project involving catch basin inspections. I have a feature service that has a related table running in AGOL, which I can successfully update both in either or both apps. In addition, I have configured a custom pop-up in the web map to pass 3 attributes from the features to prepopulate 3 fields the Survey123 form. Through testing I have found that the 3 attributes will pass from Collector to Survey123 in both a Windows environment and on an iPhone running iOS 10.3.3, but will not work on an iPad with up-to-date Collector and Survey123 apps and iOS 10.3.3. The only attributes that will transfer through the custom URL, when using an iPad, are the ones that do not get altered in Collector.

The url is as follows: arcgis-survey123://?itemID=de37196db3834f5989483dc6f6a1db31&field:Access={Accessible}&field:CleanStatus={CleanStatus}&field:Feature_ID={Feature_ID}

Of the 3 fields that are supposed to pass attributes from Collector to Survey123, the Feature_ID field will always work because that field doesn't get altered by the users, but the Access and CleanStatus will not pass only when using an iPad. 

I have 1) deleted surveys and reloaded them on the iPad multiple times with no change in behavior, 2) I have tried both online and offline maps in Collector with no change in behavior, 3) I have tried multiple iPads and multiple users with no change in behavior.

The crew that is doing the field work only has an iPad available to them, so I need to make this work on the iPad as I have no other alternative.

Any suggestions or troubleshooting ideas are welcome!

Many thanks.

Brett Horr

0 Kudos
5 Replies
by Anonymous User
Not applicable

Brett,

I believe it has to do with the structure of the URL you created for this task. You are just missing one small item and that is the dollar sign in front of the fields and this is what it should look like below. We use this process with iPads all the time.

arcgis-survey123://?itemID=de37196db3834f5989483dc6f6a1db31&field:Access=${Accessible}&field:CleanStatus=${CleanStatus}&field:Feature_ID=${Feature_ID}

Cheers!

Mike

0 Kudos
BrettHorr
New Contributor III

Hi Mike,

Thanks for the suggestion. I was hoping it was going to be a simple fix!

Unfortunately, when I add the dollar signs ($) into the URL, the values then get converted from arcgis-survey123://?itemID=de37196db3834f5989483dc6f6a1db31&field:Access=${Accessible}&field:CleanStatus=${CleanStatus}&field:Feature_ID=${Feature_ID} to arcgis-survey123://?

to

itemID=de37196db3834f5989483dc6f6a1db31&field:Access=%24{Accessible}&field:CleanStatus=%24{CleanStatus}&field:Feature_ID=%24{Feature_ID}

This means all of the values do transfer from Collector to Survey123, but so does the text %24 in front of the values. So a Feature ID of BM110 now appears as %24BM110. 

I have tried putting the $ symbol inside the curly brackets, in single quotes, and in double quotes, but no luck thus far. I am going to keep trying though!

Thanks again!

Brett

0 Kudos
by Anonymous User
Not applicable

Brett, I apologize as I was thinking of a different workflow within Survey123.

This method should work, but can you verify that the fields schema are setup; text, double, date, and etc., within both the feature service layer that is within Collector and the Survey123 app identically. You also want to pay attention to the lengths of the string fields also, as you cannot fit a 40 character long string into a string field that allows 30 characters.

Just wondering if there is a mismatch on the type of field and/or maybe the character lengths or values being passed for the other two fields?

I see that you have one field within the Collector side of things that is different from the Survey123 app Access vs. Accessible. Although I do not think that should matter.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Brett,

I tested a similar workflow on an iPad w/ 10.3.3 and updated Collector & Survey123 and I'm not seeing this behavior.  I'm a little perplexed that it is occurring on the iPad but not he iPhone.  One thing to check is the the capitalization is correct- iOS is case-sensitive.

0 Kudos
BrettHorr
New Contributor III

Hi James,

I have spent time comparing the field names, field lengths, etc. and I haven't found anything that would throw off the custom URL.

Note: All the testing below has been done in both online and offline modes. Also, all of the fields that I referencing have domains, so the users only see pick-lists. I have compared the domain values in both Collector and Survey123 and they appear to be identical.

However, I decided to spend some time looking at what values are being passed inside of the custom URL and I have found that the values inside the custom URL are different depending on the device.

If I edit Feature ID BM104 to reflect the values I wish to pass between Collector and Survey123 on my iPhone my custom URL looks like 

arcgis-survey123://?itemID=de37196db3834f5989483dc6f6a1db31&field:Access=Accessible&field:CleanStatus=Needs%20Checking&field:Feature_ID=BM104

If I reset those attributes back to their original values in either the iPhone or Windows and make the same edits on Feature ID BM104 on my iPad the custom URL looks like

arcgis-survey123://?itemID=de37196db3834f5989483dc6f6a1db31&field:Access=&field:CleanStatus=Needs%20Checking&field:Feature_ID=BM104

So it would appear that after I hit the 'Update' button in Collector the Access field will not immediately update with the new values.

Interestingly, when I am using my iPad, if unselect a feature I just edited and then reselect the same feature the custom URL is 

arcgis-survey123://?itemID=de37196db3834f5989483dc6f6a1db31&field:Access=Accessible&field:CleanStatus=Needs%20Checking&field:Feature_ID=BM104

and now the Access field is populated.

I now the differences are subtle, but I really don't want my field crew to have to unselect and the reselect a feature in order to pass 1 value that is required!

Any additional thoughts or suggestions are welcome!

Thank you!

Brett

0 Kudos