Hi, guys. First of all sorry for my poor english.

I need to know how to use "if" and "then" to set a value.

For Exemple:

I have a fild that need to display a value to the user:

If (totalbrocasha "greater than" 3000 then coposliberar "equal" 12)

Hi, guys. First of all sorry for my poor english.

I need to know how to use "if" and "then" to set a value.

For Exemple:

I have a fild that need to display a value to the user:

If (totalbrocasha "greater than" 3000 then coposliberar "equal" 12)

Nice, it's works. Thank you so much.

I have one last doubt:

And if I have more arguments?

For exemple:

if

<= 399 then*totalbrocasha*need to be 0*coposliberar*if

>= 400 and <= 2999 then*totalbrocasha*need to be 8*coposliberar*if

>= 3000 and <= 3999 then*totalbrocasha*need to be 12*coposliberar*if

>= 4000 and <= 5999 then*totalbrocasha*need to be 18*coposliberar*and finally if

>= 6000 then*totalbrocasha*need to be 22*coposliberar*

I've tried this way:

if(${totalbrocasha}>6000,22,if(${totalbrocasha}<=5999>=4000,16,if(${totalbrocasha}<=3999>=3000,12,if(${totalbrocasha}<=2999>=400,8,0))))

But the result is aways "0".

- 1 person found this helpful
Nested if statements are really tough sometimes. These are a lot like what is used in attribute assistant: All methods - Attribute Assistant | ArcGIS Solutions (scroll down to additional functions). I suggest working with your statements one at a time, adding as you go. See: IIF function in Dynamic Value table

Thank you for your help, Joe.

I've tried the solution that works for IIF function in Dynamic Value table (using 0, Null, <Null>, 00, "", [#] and "Nothing", like Jennifer Stone did).

But I still receiving only 22 or 0 as a final result.

- 2 people found this helpful
Hi Marco,

Your evaluations for the if() functions after the first will not work - what you are trying to do would require a compound statement (i.e., ${totalbrocasha}<=5999 and ${totalbrocasha}>=4000 ). That being said, with a nested structure like this, you don't need one side of the limit - it's already taken care of by the previous statement (i.e., the <=5999 is unnecessary as you already have caught all values larger with the first evaluation >=6000 ).

The following expression will return 12 if

totalbrocashais greater than 3000 and otherwise, it will return 0.You can use this expression in the

calculationcolumn of thecoposliberarquestion.The Quick reference—Survey123 for ArcGIS | ArcGIS is a great topic to learn all the things you can do with formulas in XLSForms.