I used the sample called "Calculate Location from CSV", modifying the sample slightly to point to an updated pulldata table and to use different field names. I still get the error: FormLogicError: instance "lift_locations" does not exist in model. I attached the survey and the pulldata table. Thanks for the help.
Solved! Go to Solution.
Hi Wetherbee,
Yes, you are correct that the sample needs to be updated. It functions because there are other pulldata() functions that exist by themselves - they provide enough information for the form to work around the issue.
Hi Wetherbee,
pulldata() functions are not designed to occur within other functions. The best practice would be to have a hidden question store the value looked up via pulldata() and reference that question in the question with the concat function. If you do not want to write the hidden question to the feature service, set the bind::esri:esriFieldType setting to null to have the form ignore that question on submission.
I actually did what you suggest. Still not working. Please look at attached? Many thanks!
Did you provide an updated Excel sheet? I only see the version in the initial post, which has a pulldata() function within a concat().
What I should have written is that I mimicked the sample included with survey 123 directly, which uses the pulldata statement within a function. If that is not a best practice, I am surprised to see it included as an official sample. The sample works. Just cannot figure out why my version does not.
Hi Wetherbee,
Yes, you are correct that the sample needs to be updated. It functions because there are other pulldata() functions that exist by themselves - they provide enough information for the form to work around the issue.
Hi James,
"pulldata() functions are not designed to occur within other functions." Does this also extend to nested IF statements? I want to use the pulldata() function depending upon the input of a previous question.
Thank you,
dave-o.
Hi Wetherbee,
The issue is that the pulldata function is still inside another function - in this version the number() function. Pulldata() must at minimum begin the question - if you migrate the number() functions to the geopoint question, it will work.
Yep, that did it. Once I calculated the lat and lon from the pulldata table (as strings), I
concat(number(${lat}),' ',number(${long})
Many thanks