dim retVal as integer
function GetResult(ByVal subUnits as Decimal, ByVal AppUnits as Decimal, BYVal canUnits as Decimal) as Integer
dim res as decimal
if subUnits <> 0 then
res = AppUnits-CanUnits/SubUnits
if res < 0 then
return 0
else
return 1
end if
else
return 0
end if
end function
finally in the expression, =Code.GetResults(param1, param2, param3)