when condition with DB query
Is it possible to use a DBQuery in a WHEN CONDITION?
The DBQuery alone works and returns Plan5 or Plan9:
DBQuery {select policynumber from bc_plan_enrollment where employeeSSN = '$Input_AdvDBSchema/DB/bc_plan_enrollment/EmployeeSSN' and policynumber is not null,$vTestDb ,true }
But as soon as I put it inside a when condition I get an XML error:
WHEN CONDITION{DBQuery {select policynumber from bc_plan_enrollment where employeeSSN = '$Input_AdvDBSchema/DB/bc_plan_enrollment/EmployeeSSN' and policynumber is not null,$vTestDb ,true } = 'Plan5' } VALUE=['Worked'] OTHERWISE VALUE=['OtherwiseWorked' ]
"String index out of range: -1"
-
Try placing the db query within a local variable
varResult = DBQuery {select policynumber from bc_plan_enrollment where employeeSSN = '$Input_AdvDBSchema/DB/bc_plan_enrollment/EmployeeSSN' and policynumber is not null,$vTestDb ,true }
Then try using that varResult variable within your when condition.
0
Post is closed for comments.
Comments
1 comment