Hi There, I am trying to set the variable $theCustomRiskAnalysis/indFinancialInstitution to true if the variable $sic87 contains either string '6141' or string '6371' or string '6723'. The 'Edit Change Item' for variable indFinancialInstitution is is as follows: if ( $sic87='6141' or $sic87='6371' or $sic87='6723') then $theCustomRiskAnalysis/indFinancialInstitution = true else $theCustomRiskAnalysis/indFinancialInstitution = false The weird thing is that the variable $theCustomRiskAnalysis/indFinancialInstitution is set to true eventhough the variable $sic contains a string which is not equal to one of the three strings mentioned above (in this case it contains '3714). Is there a logical explanation for this? I assume that you can use the OR within the IF but I am not 100% sure as there is not much documentation available around this.
From your expression it seems that you are trying to assign a value to the 'indFinancialInstitution' attribute. However, since you are already editing a change item for that attribute, you can simply write the value you want to assign.
In this case, you can probably replace the entire expression by:
$sic87='6141' or $sic87='6371' or $sic87='6723'
Benny van Reeven
if ( $sic87='6141' or $sic87='6371' or $sic87='6723')
Thanks for your answer. It indeed solves the problem I had and the code is more compact.
However, I dont understand why the solution I had did not work.
Thank you both for your prompt answers. Now I know how to use the expressions correctly !