$bShowButton = <logical expr>;

However, this did not work. I was a long time examining the components of the expression, only to find they all behaved as I expected, and that this formulation:

$bShowButton = false; if (<logical expr>) $bShowButton = true;

worked fine, so the logical expression I thought must be wrong was actually right. However, I don't understand why the two bits of code yield different outcomes (the first always yields true). Can anyone explain? For the record here is my actual expression, although I think it is irrelevant:

$bShowButton = ($dtmCurrentSlotTime >= $dtmLaunchDate) And ($bIsAdmin Or !$bSlotNotAvailable) And (!$bBlockedOut) Or ($bAdminBlockOutMode And !$bBlockedOut); $bShowButton = false; if (($dtmCurrentSlotTime >= $dtmLaunchDate) And ($bIsAdmin Or !$bSlotNotAvailable) And (!$bBlockedOut) Or ($bAdminBlockOutMode And !$bBlockedOut)) $bShowButton = true;