pulldata(@javascript) error, can't access extensions folder

845
4
Jump to solution
02-26-2020 10:07 AM
RogerCleaves1
New Contributor III

Hello,

I'm trying to implement the pulldata(@javascript) functionality for a lookup table function. I'm using the @javascript option instead of csv because the language we need to pull has commas in it, and I was hoping this would be a good solution to pull those values through.

When I go to implement the pulldata function though, I get the following error in the Survey123 Connect display:

Don't mind it calling the toCelsius function, I was trying to use that as a test to eliminate my function as the error.

I've attached a zipped-up version of my form.

Thanks!

0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

Hi Roger,

The error indicates a problem with your JavaScript file - there's something in it that isn't valid.  Looking at the file, there is an issue with the second object in the array data - it's missing the leading { .  You may want to use a resource like JSLint: The JavaScript Code Quality Tool to check the file - I can also see an issue in the function search (searchValue1 vs. SearchValue1).

View solution in original post

0 Kudos
4 Replies
BobHenry1
New Contributor

Are you logged in to Survey123.  I had the same error on previously working JavaScript and realized I was logged out.

0 Kudos
RogerCleaves1
New Contributor III

Hi Bob,

Yep, logged into AGOL. I also logged out and then back in to verify I had a good connection.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Roger,

The error indicates a problem with your JavaScript file - there's something in it that isn't valid.  Looking at the file, there is an issue with the second object in the array data - it's missing the leading { .  You may want to use a resource like JSLint: The JavaScript Code Quality Tool to check the file - I can also see an issue in the function search (searchValue1 vs. SearchValue1).

0 Kudos
RogerCleaves1
New Contributor III

Hi James!

Yes, I had a few issues, thanks for the JSLint tip, that helped a lot.

I thought I had solved it, but ran into an issue where it wouldn’t load the changes. However, upon googling like crazy, I found a reply that someone wrote that said if you close Connect all the way and then re-open it, the changes should load through. Ta-da!

Thanks again!

Roger

0 Kudos