Dear Community Members.

I have a local variable $total in the script which might have a 0 as a value.

I want to check for zero value.

My syntax

If [ $total != "0" ] and If [ $total != 0 ] line is not working

I am not be able to move line below after this point. It just automatically removes this line.

Anybody has any idea about it.

Thank you,

Kamal.

You are trying to do math with a programming function.

Math uses the operators <> (Windows) and ≠ (Mac).

Programming uses !=

FMP has a drop down menu to make it easier to enter the Math Functions used by FMP.

If [ $total ≠ "0" ] and If

Since this is a number compare you only need the one test case.

If [ GetAsNumber ( $total ) <> 0 ]