This is a simple panel that replaces a parameter's constraint.It contains all of the basic pieces you would need to do what you're talking about.
Check it out and let me know if you have any additional questions.
Cheers!
James
<abs contexttype="opengear" style="">
<meta>
<params>
<param access="1" constrainttype="INT_CHOICE" name="Test Toggling" oid="params.testtoggle" precision="0" type="INT16_ARRAY" value="0;0;0;0" widget="13">
<constraint key="0">1080i</constraint>
<constraint key="1">1080i</constraint>
<constraint key="0">720p</constraint>
<constraint key="1">720p</constraint>
<constraint key="0">NTSC</constraint>
<constraint key="1">NTSC</constraint>
<constraint key="0">Bork</constraint>
<constraint key="1">Bork</constraint>
</param>
<param access="1" constrainttype="INT_CHOICE" name="Constriant Toggle" oid="Constriant_Toggle" precision="0" type="INT32" value="0" widget="radio-toggle">
<constraint key="0">Constraint 1</constraint>
<constraint key="1">Constraint 2</constraint>
</param>
</params>
</meta>
<simplegrid height="160" left="16" top="14" width="593">
<param expand="true" oid="params.testtoggle" showlabel="false" style="style:toggleButton;"/>
</simplegrid>
<param expand="true" height="90" left="20" oid="Constriant_Toggle" style="style:toggleButton;" top="199" width="583">
<task tasktype="ogscript">// creating an array to hold the constraint values
var cArray = new Array();
//obtaining the value of the ConstraintToggle parameter to decide which constraint list should be pushed into the arrray
if (this.getValue() == 0)
{
// Placing the values into the array if the ConstraintToggle parameter is equal to 0
// each value has two keys assigned to it because when the array is converted into a choice constraint option the key's determine which option has been selected by spewing out the value 1
cArray.push({key:0,value:'1080i'});
cArray.push({key:1,value:'1080i'});
cArray.push({key:0,value:'1080p'});
cArray.push({key:1,value:'1080p'});
cArray.push({key:0,value:'720p'});
cArray.push({key:1,value:'720p'});
cArray.push({key:0,value:'480i'});
cArray.push({key:1,value:'480i'});
}
else
{
// Placing the values into the array if the ConstraintToggle parameter is equal to 1
// each value has two keys assigned to it because when the array is converted into a choice constraint option the key's determine which option has been selected by spewing out the value 1
cArray.push({key:0,value:'One Fish'});
cArray.push({key:1,value:'One Fish'});
cArray.push({key:0,value:'Two Fish'});
cArray.push({key:1,value:'Two Fish'});
cArray.push({key:0,value:'Red Fish'});
cArray.push({key:1,value:'Red Fish'});
cArray.push({key:0,value:'Blue Fish'});
cArray.push({key:1,value:'Blue Fish'});
}
// using the params.createIntChoiceConstraint function to convert the values in the array a choice constraint option
var choiceConstraint = params.createIntChoiceConstraint(cArray);
// the params.replaceConstraint function replaces the current choice constraint on the ConstraintParameter with the choiceConstraint variable.
params.replaceConstraint('params.testtoggle', choiceConstraint);
</task>
</param>
</abs>
#DashBoard