Javascript functions suddently not working?

11-18-2021 08:52 AM
New Contributor III


We have been using a JS function within our Survey123 surveys for months, with no issues. The JS function was a single-line one, which simply created an 8-digit timestamp. It was working fine on Nov. 15. Suddenly (Nov. 17), the destination field in the corresponding feature layer in AGOL is null.

We have tested creating a survey from scratch, in Connect, starting from the Advanced template and simply modifying it to introduce a calculate row with a "HelloWorld" JS function. Same result.

We have tested publishing the survey to 2 different AGOL organizations. Same result.

We have updated Connect from 3.13.239 to 3.13.249 (the latest as of this moment). Same result.

If we remove the JS function and introduce whatever other data-creation method (like, for instance, pulldata("@property", 'language')), the data is created fine and populates the target feature layer.

We are scractching our heads here...

0 Kudos
3 Replies
Esri Regular Contributor

Hello @Jordi-Monk-Developer

I am not able to reproduce the behavior on my end, I've tested with Connect 3.13.249 and Field App 3.13.244 and the results from the JS functions were submitted to the feature service. I've attached a copy of the survey that I had tested with. 

If possible would we be able to obtain a copy of the survey for testing on our end? 

Thank you,
New Contributor III

Thanks for the help, @ZacharySutherby . I need to check with my employer. We might need to send it via Support. If that is the case, I will update this thread with the results. Thank you.

0 Kudos
New Contributor III

@ZacharySutherby Everything is back to normal this morning. WITHOUT having modified anything on our side in the meantime, all (3+) surveys that were failing to write data generated from JS functions now work fine.

Thank you. Case closed.

0 Kudos