In a scoped application, if you have a catalog item/record producer that has variables of type Macro, an onload or onchange catalog client script does not hide the Macro variables.
Steps to Reproduce
Import the attached update set and commit it.
Navigate to System Applications > Applications.
Look for the setVisibleTest application and open it.
Under the Application Files tab, look for the Catalog item SNC Test.
Click Try It.
Note that when the catalog item loads, the macro button variable should be hidden (via the onload client script that uses the setDisplay function) but it is still visible.
Use the �g_form.setVisible function instead of the g_form.setDisplay function.
Related Problem: PRB1259274