If Else support
Status: Beta
Brought to you by:
jkhahn3
Hi, is there any plan to add support for If/Else statements ? I'm trying to create a script for Tortoriellos screen published by AAII recently with many custom defined fields such as,
[SI Pre-tax income 12m] + IIF(IsFieldNull([SI Interest expense 12m])=0,0,[SI Interest expense 12m]) + IIF(IsFieldNull([SI Depreciation 12M])=0,0,[SI Depreciation 12M])
IIF means if(true/false, true result, false result). It appears If/Else statements are needed for defining such field. Or is there workaround using what available in RanRadis today ?
Further, is there a way to test if a field is empt (IsfieldNull()) in current RunRadis ?
Many thanks !!
If/Else values are supported via "IF" rather than "IIF" - standard excel syntax. To check if a field is null, use: field="".
So the you could write this equation as:
[SI Pre-tax income 12m] + IF([SI Interest expense 12m]="",0,[SI Interest expense 12m]) + IF([SI Depreciation 12M]="",0,[SI Depreciation 12M])
However, when used as numbers, null fields act like "0" anyway, so you you could write this more simply as:
[SI Pre-tax income 12m] + [SI Interest expense 12m]+[SI Depreciation 12M]
-Jim