# Calculation Question

650
4
04-18-2022 02:30 PM
by
New Contributor III

How do I get the 100 from silt_total_estimated not to display in the output if nothing in the prior columns is entered to calculate the clay_sand_total?

Thanks

1 Solution

Accepted Solutions
by
MVP Regular Contributor

Both answers will work. Ismael's answer will hide the question entirely, while Robert's will show the entry field but hide the result.

If we combine Robert and Ismael's answers, we get:

if(string-length(\${clay_sand})>0,100-\${clay_sand},0)

I haven't tested this, but should work. The field will likely only update after entering data into clay_sand and then tabbing to another field.

4 Replies
Frequent Contributor III

have you tried a combination of the relevant column and the calculation column.

Try using an "if" statement in the calculation.

https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm

Esri Notable Contributor

Attaching an example

Tips:

• For the silt + sand question, instead of using the hidden question type, use an integer type and set the appearance to hidden
• Use the esri::body:style column to show/hide the clay question

by
MVP Regular Contributor

Both answers will work. Ismael's answer will hide the question entirely, while Robert's will show the entry field but hide the result.

If we combine Robert and Ismael's answers, we get:

if(string-length(\${clay_sand})>0,100-\${clay_sand},0)

I haven't tested this, but should work. The field will likely only update after entering data into clay_sand and then tabbing to another field.

by
New Contributor III

Thank you @abureaux , @IsmaelChivite , @RobertBorchert! This helped immensely! I'm still trying to learn all the various ways to do calculations!  Examples really help me and the Survey123 help is very simplistic in their examples.  I really liked learning the different way to hide the fields.