Is it possible to capture the current temperature, either at the user's gps location, or from a choice of say, 6 major cities, in a form?

3095
8
06-30-2016 10:26 AM
LynnCarlson__GISP
Occasional Contributor


My form is being used to collect environmental data and it would be great if the current temperature could be "pushed" to the xlsform from say, a NOAA site, or something like the weather channel. 

8 Replies
IsmaelChivite
Esri Notable Contributor

Hi. This is not possible at the moment with the out of the box Survey123 app. However, since the source code of this app is available with AppStudio for ArcGIS Standard, you could implement this logic in a custom flavor of Survey123.

EliasLiakos
New Contributor II

Have any updates allowed for this ability?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Elias,

This can be implemented using a feature currently in beta - custom JavaScript functions.

0 Kudos
BrianCulpepper
New Contributor III

Hello James/Elias,

I'm having partial success using the WeatherData.js Example from the Early Adopters - Survey123 -custom JavaScript functions.  I was able to get a simple example to work just fine and it's uses the geopoint to submit an xmlhttp request to the openweather.org api and returns JSON..  Once I tried moving the sample into my production survey, no love was found...

I've updated my XLSform version, followed the sample setup and therefore the same javascript file stored in the 'extensions' folder, but the weather data fields won't populate outside of Survey123 Connect (win10). I've re-published a fresh Survey but still no luck; using the latest versions of Connect, Fieldapp, etc. Testing on iOS, windows10 and android without consistency.

So, is it safe to say, it's just too early for this feature or would anyone have any suggestions?

thanks all,

brian

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Brian,

Do you receive any other messages?  Can you start a troubleshooting log (see Troubleshoot—Survey123 for ArcGIS | ArcGIS ) - that might help see what the issue is?

0 Kudos
BrianCulpepper
New Contributor III

James,

Thank you for replying to my comment.     I have been unable to view/capture any other error messages from my iphone Survey123 Diagnostics console on my desktop AppStudio install.. I must be doing something wrong because I was able to connect to my desktop from my iPhone5s...  The JSON/javascript function will be helpful in the future and I will continue development and consider using it..  at the moment, I've determined another solution that works fine after the survey point has been submitted..

thanks much for listening and the continued improvements/demonstrations with Survey123.

if there are any tips/tricks/blog posts regarding the use of the diagnostic features within QT/AppStudio/Survey123 then I'd love to know where I may find them.. I hesitate to complain because I just know it's out there, somewhere...already.. ha!

best,

brian

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Brian,

The Troubleshooting document I linked to is the primary resource.  You don't necessarily need to have AppStudio - simply turning on logging will default to a text file (which, for iOS, you will need to extract using iTunes).  The main thing to note is that the error often is towards the bottom and will begin with a code of <10> or <12> (these codes get turned into the warning/error symbols in the AppStudio Console).

0 Kudos
avilaraCDOT
New Contributor

Hey James,

What is the status of this request?  We want to implement this function in our Apps.

Thanks!

0 Kudos