FormLogicError in Survey123 browser

1097
5
03-19-2019 01:33 PM
PhilipLegrone1
New Contributor

Survey123 is working fine in the App, but when I try it in the browser I get the following error message:

FormLogicError: instance "Zipmod" does not exist in model

I read through the replies to similar questions, but have not found anything that solves the problem.  I've attached the zipped form and related csv files.  Hopefully it's something simple I am just spacing on.

Thanks,

Phil

0 Kudos
5 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Philip,

The issue is that the pulldata function using the ZipMod table is inside a round() function.  At least one occurrence of pulldata must begin a calculation for each table in order to be properly recognized - I would remove it from the round() function and instead place the round() function in the later question's calculation.

PhilipLegrone1
New Contributor

James,

Thanks for your timely reply.  I broke the process into a pulldata function followed by a round in the next question as suggested.  The error does go away and it works on the app (as it did before), but in the browser version the Total Building Value field does not populate nor does the Building Cost per Square Foot.  Without the latter value the former value cannot calculated.  It clearly is not looking up correctly in the browser version.  I checked the syntax and did not notice any issues, but maybe there is something incorrect with my pulldata statement:

pulldata('Building', 'Base_Cost_Per_SqFt', 'Concate', ${occupancy}+${construction})

The csv it is pulling from has not changed from what I attached in my question above.  I have attached the updated form and files.

Thanks,

Phil

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Philip,

The issue is likely the use of functions in generating the lookup value inside the pulldata

- occupancy and construction are both select_one questions, which are text.  You need to use the concat() function to join them.

- the formula in total_bldg_value_raw should ideally be in it's own question after the pulldata it contains so that you can convert the text looked up (all values coming from pulldata are treated as text) to a number

In general, it is best to have the pulldata function in a calculate question by itself and then use that question in a function later.  You can use the Esri:bind:fieldType value of null to prevent a question (like the intermediate calculations) from being stored in the table.

PhilipLeGrone2
New Contributor

James,

This did the trick.  I broke the steps out into pulling the text data, converting the text to a number, and then doing the math.  I just hid all the data as it was being pulled and then only displayed the converted value for the app user.  All works fine in the browser as well now.  Thanks so much for your helpful responses.

Phil

0 Kudos
MarcoMedeirosJr
New Contributor

Guys,

I'm still dealing with this issue. But i'm not using "+" instead of "concate" as you can see on my project. It is working in mobile app but not in webform. Any ideia?

 

0 Kudos