The query returns records where
RBP_MASTER_ID = the value from the form field AND
SEND_TO_LEADER = YES AND
RENEWAL_SKU = NO
Your conditional checks to see if any records are returned (countme_stl > 0) if so then set the BOOLEAN value to FALSE
There is no Else part to the conditional. The default value for a BOOLEAN is FALSE so the code always returns FALSE.
Unless I'm missing something.
OM Gang
omgang
You need to know how many records there are total in the table where RBP_MASTER_ID = the value from the form
Then you can compare that total count to the count of those records where the other two conditions are met.
If the counts are equal then BOOLEAN value = True
If not, then FALSE
aikimark
Your query, as written, should return all rows that meet your criteria. Do you suspect that some rows violate that condition?
RBP_MASTER_ID = the value from the form field AND
SEND_TO_LEADER = YES AND
RENEWAL_SKU = NO
Your conditional checks to see if any records are returned (countme_stl > 0) if so then set the BOOLEAN value to FALSE
There is no Else part to the conditional. The default value for a BOOLEAN is FALSE so the code always returns FALSE.
Unless I'm missing something.
OM Gang