Hi,
I've got a formula (formula2) which needs to be evaluated after formula1 to return the correct results.
Formula2 looks something like this:
evaluateAfter({@formula1});
if {ACCOUNTS.STATUS} = 'LAST' then
(local stringvar returnval := ' ';
if not isNull({ACCOUNTS.FIRSTNAME}) then
returnval := returnval + {ACCOUNTS.FIRSTNAME} + ' ';
if not isNull({ACCOUNTS.LASTNAME}) then
returnval := returnval + {ACCOUNTS.LASTNAME + ' ';
if returnval <> ' ' and length({@formula1}) = 0 then
returnval := 'NAME=' + returnval;
trim(returnval)
)
The formula should only add the 'NAME=' text in the return value if formula1 is blank. However, it seems to be adding that text even when formula1 is not blank (and testing has shown me that within the if statement, formula1's value is always blank). Any thoughts on what I'm doing wrong here?
Thanks.
I've got a formula (formula2) which needs to be evaluated after formula1 to return the correct results.
Formula2 looks something like this:
evaluateAfter({@formula1});
if {ACCOUNTS.STATUS} = 'LAST' then
(local stringvar returnval := ' ';
if not isNull({ACCOUNTS.FIRSTNAME}) then
returnval := returnval + {ACCOUNTS.FIRSTNAME} + ' ';
if not isNull({ACCOUNTS.LASTNAME}) then
returnval := returnval + {ACCOUNTS.LASTNAME + ' ';
if returnval <> ' ' and length({@formula1}) = 0 then
returnval := 'NAME=' + returnval;
trim(returnval)
)
The formula should only add the 'NAME=' text in the return value if formula1 is blank. However, it seems to be adding that text even when formula1 is not blank (and testing has shown me that within the if statement, formula1's value is always blank). Any thoughts on what I'm doing wrong here?
Thanks.