Continued issues with pulldata in web forms

1836
11
Jump to solution
08-20-2018 01:56 PM
WetherbeeDorshow
New Contributor III

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.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

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.

View solution in original post

0 Kudos
11 Replies
JamesTedrick
Esri Esteemed Contributor

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.

0 Kudos
WetherbeeDorshow
New Contributor III

I actually did what you suggest. Still not working. Please look at attached? Many thanks!

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Did you provide an updated Excel sheet?  I only see the version in the initial post, which has a pulldata() function within a concat().

0 Kudos
WetherbeeDorshow
New Contributor III

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.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

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.

0 Kudos
daveostrander
Occasional Contributor II

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.

0 Kudos
WetherbeeDorshow
New Contributor III

OK, I attached an updated version of both the survey and the pulldata table

Thanks

0 Kudos
JamesTedrick
Esri Esteemed Contributor

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.

WetherbeeDorshow
New Contributor III

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

0 Kudos