ArcGIS Survey123 -n.attributes[h].push is not a function Error

1077
7
09-22-2021 12:43 PM
HasanGüler
New Contributor II

Hello everyone,

I created the attached survey form, but I am getting the error in the image below. I would be very grateful if you could help me solve this error.

 

HasanGler_0-1632339796693.png

 

Tags (1)
0 Kudos
7 Replies
JamesTedrick
Esri Esteemed Contributor

Hi @HasanGüler ,

In looking at your form, there appears to be a JS file that should accompany it - could you provide that to limit unintentional errors?

0 Kudos
HasanGüler
New Contributor II

Hi James,

I cannot attach .js file here, since it does not support but it is quite easy js file as follows:

function capitalize (string) {
return string.replace(/i/g,"İ").toLocaleUpperCase('tr-TR');
}

Thanks,

 

0 Kudos
DeonLengton
Esri Contributor

Hi @HasanGüler 

From looking at your JS script I see you have a variable called "string".

This could be a reserved keyword - I would propose renaming it to "source_string" or something like.

I can simulate the error you're getting though - will troubleshoot it from my side as well.

0 Kudos
HasanGüler
New Contributor II

Hello Deon,

We are using that js file for more than 20 surveys and they are all okay. I publish a new survey without any js file from scratch but the problem still arises.,

Thanks

0 Kudos
HasanGüler
New Contributor II

We realized that if we eliminate one of the repeat questions, the problem does not appear but we need two related tables for this survey.

0 Kudos
DeonLengton
Esri Contributor

Hi

Yes I also thought it could be the repeat per household... but i fell short of fixing it 😞

And it works on the Survey123 mobile app - it just fails on the web

0 Kudos
alison_gou
Esri Contributor

Hi @HasanGüler ,

In your xlsx, row 72, a repeat name is the same as row 35, a hidden question name. The names are both 'ihtiyaclar'. That's why the survey in web app runs into issue. 

Please rename one of them and republish to see if your survey works okay.

 

0 Kudos