Prepopulate answers in the survey with Collector (Aurora Project)

753
6
02-22-2019 03:13 PM
Comisión_Estatal_de_Aguasde_Qu
New Contributor II

Hi, Scott Prindle.

I have a issue that I am trying to resolve. As a bit of background, I am using collector classic with a smart form in Survey123 to capture information about that particular asset, the form in survey is prepopulate in some fields  from collector to survey and everything works well. 
Now we are testing our workflow in Collector  (Aurora Project) app for Android  and we  using the Collector pop-up to pass values of some fields into a related Survey123. 
I have understood that specifically, the URL scheme in Survey123 allows you to:
  • Launch the Survey123 app
  • Open a survey
  • Prepopulate answers in the survey
arcgis-survey123://?itemID=b8069855c9644101a32bea87139d2879&field:numorden={OrdenServi}&field:fechaasig={FechaAsignacion}&field:contrato={Contrato}&field:reptipo={RepTipo}&field:numdistrito={NomDistrito}&field:numempleadouno={Inspector}
But we have a problem when we try to prepolate a particular date field into a related Survey123 the field isn´t display in the form.
0 Kudos
6 Replies
MarkBockenhauer
Esri Regular Contributor

I have shared this simple survey with everyone.

I you try using this link in your popup, does it pass the date?

arcgis-survey123://?itemID=a05cbcce97e448d9b8bd1570eab697f6&field:DateField={created_date}

I think it should work.

Mark

Comisión_Estatal_de_Aguasde_Qu
New Contributor II

Hi Mark,

Thank you for the suggestion.

Yes, I tried to pass!! but the field isn´t display in the form.

I try to pass six fields but only the date field isn´t display in the form.

This is my link in my popup

arcgis-survey123://?itemID=b8069855c9644101a32bea87139d2879&field:numorden={OrdenServi}&field:fechaasig={FechaAsignacion}&field:contrato={Contrato}&field:reptipo={RepTipo}&field:numdistrito={NomDistrito}&field:numempleadouno={Inspector}
Ana.
 
0 Kudos
MarkBockenhauer
Esri Regular Contributor

In Collector tap and hold your link.

A panel will ask you what you want to do with the link, notice that the URL is shown on the Panel.

Does your URL have the correct date in it?

Mark

Comisión_Estatal_de_Aguasde_Qu
New Contributor II

Hi Mark.

Yes, I think that my URL has the correct date.

Note: I use Collector Beta for Android.

 The date field isn´t display in the form

Ana.

0 Kudos
MarkBockenhauer
Esri Regular Contributor

Ana,

I think I have a solution,  instead of passing a "date string" which is prone to error, we can use Arcade expression to pass the date as an epoch time value.

In your webmap.

Configure Popup

Add an Attribute Expression

Set your date field to a Number

for your data  Number($feature["FechaAsignacion"])

Configure the Hyperlink in the Popup to use the expression.

Notice in the Popup the value still is not correct. I used the Expression as Title and link text.

You also need to set the Formatting for the Arcade expression.

No Separator and No decimals

Now the Popup value for epoch time is correct.

This should pass correctly to Survey123

thanks for the question, it provided an opportunity for me to learn something new.

Mark

Comisión_Estatal_de_Aguasde_Qu
New Contributor II

Hi Mark

The problem is solved,  thanks for your time and your knowledge!!!

0 Kudos