When attempting to run an If Functions, Data Generation Functions and Parameters (broadcom.com), within a generator, both the TRUE and the FALSE expressions will be evaluated, which could result in errors being thrown depending on the logic/requirements of the IF.
@IF(~ImportantTableDoesNotExist~, @execsql(Pprofile,select * from OTHERTABLE)@, @execsql(Pprofile,select * from ImportantTable))@
In this case, "ImportantTable" doesn't exist, so selecting from said table will return an error.
One wouldn't expect an error to occur in this scenario since most programming languages/logic will only execute the appropriate statement after an IF had been evaluated.
test data manager
TDM variable/function parser works from the inside out.
It must resolve all variables and functions so that the proper data is generated as expected once all functions return at the top level.
In the case of an IF function, BOTH the TRUE and FALSE expressions will be evaluated before the Boolean value is evaluated.
This is working as designed.
The parser works like this for all functions and is not limited to the IF function.