@lillewill Sorry, I should have tested it. There are a couple syntax issues: 1) it needs a parenthesis after the 3 and 2) there should be a triple equals sign signifying that it is a conditional expression and not an assignment:
export function radiobuttongroup1_change(event) {
if ($w('#radiobuttongroup1').selectedIndex === 3) {
if ($w('#box').collapsed) {
$w('#box').expand();
} else {
$w('#box').collapse();
}
}
}