In the following screenshot, the fields 5 & 6 are calculated based on data in fields 1-4. The whole group (fields1-6) is relevant as to whether or not a sample is collected. But, when no sample is collected, the calculated fields are returning 0.00. I would like them to be blank. Is there a way to control (cancel) the calculation when the relevant expression is not met?
Hi Lynn,
I am seeing that calculate questions are submitting their calculations when not relevant. However, it I'm not seeing the effect when the items are in a group. Can you share the survey or the part of the survey experiencing the issue?
Hi Lynn,
This doesn't appear to be the right survey- I'm not seeing the group you refer to.
Hi James,
That's the one, the group starts on line 19 of the sheet.
Thanks, I missed it in my review. In looking through what's occurring, it appears there is a change in how null values are being handled- before, they would have prevented the pulldata() function from running. I've filed an issue to look into this.
You should be able to wrap the calculation in an if statement.
eg
if(${no_sample}!='',calculation,'')
This basically means that if the field ${no_sample} is not empty, then the calculation is performed, otherwise the field is blank.
or if you want it to only calculate when a certain option is chosen
if(${no_sample}='option1',calculation,'')
thanks Mark, tried the if statement and the field is still being populated with 0. This field just doesn't want to be NULL!
Hello James Tedrick,
Have there been any updates on this issue? Or maybe other suggestions I could try? It continues to plague us.
Thanks!
Lynn
is the table a .dbf or in a file geodatabase?