Page 1 of 1

If Statements with Rowsets

Posted: Tue Jun 30, 2015 4:51 pm
by kgould
I would like to test two conditions with row sets and it keeps complaining the test value is incorrect.

${ProductRowSet[1]} eq ${VarRowSet[1]} && ${VarAttrbRowSet[2]} eq ${VarRowSet[3]}

Is this something that can be done in one statement or do I need to do two if statements?

Thanks,

Re: If Statements with Rowsets

Posted: Tue Jun 30, 2015 4:58 pm
by Support_Rick
Assuming you're on GADirector verion 4.0+ ... Try something like the following:

${ ( ProductRowSet[1] eq VarRowSet[1] ) and ( VarAttrbRowSet[2] eq VarRowSet[3] ) }

All variable comparisons can be made within the same ${ } bracket structure. No need for replicated values.

Prior to 4.0, this would be something like this:

( ${ ProductRowSet[1] } eq ${ VarRowSet[1] } ) and ( ${ VarAttrbRowSet[2] } eq ${ VarRowSet[3] } )