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!
Solved! Go to Solution.
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).
Are you logged in to Survey123. I had the same error on previously working JavaScript and realized I was logged out.
Hi Bob,
Yep, logged into AGOL. I also logged out and then back in to verify I had a good connection.
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).
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