If it's a "take" button in your own custom panel, that's easy. You just make your take button set the value of both the PGM and PVW to what you want.
Here is an example of a couple of take buttons:
<abs contexttype="opengear" gridsize="20" id="_top" keepalive="false" style="">
<meta>
<params>
<param access="1" constrainttype="STRING_CHOICE" maxlength="0" name="prv" oid="prv" type="STRING" value="cam2" widget="radio-toggle">
<constraint>cam1</constraint>
<constraint>cam2</constraint>
<constraint>cam3</constraint>
<constraint>cam4</constraint>
</param>
<param access="1" constrainttype="STRING_CHOICE" maxlength="0" name="pgm" oid="pgm" type="STRING" value="cam3" widget="radio-toggle">
<constraint>cam1</constraint>
<constraint>cam2</constraint>
<constraint>cam3</constraint>
<constraint>cam4</constraint>
</param>
<param access="1" constrainttype="INT_CHOICE" name="lock" oid="lock" precision="0" type="INT16" value="0" widget="toggle">
<constraint key="0">Unlocked</constraint>
<constraint key="1">Locked</constraint>
</param>
</params>
</meta>
<param expand="true" height="60" left="100" oid="pgm" showlabel="false" top="80" width="520">
<task tasktype="ogscript">
/*! block id=1000,1001,1002,1003 !*/
if (params.getValue('lock', 0) == 1)
{
params.setValue('prv', 0, params.getValue('pgm', 0));
} else {
}
/*!!
<block id="1000" type="if" x="461" y="100" w="268" INPUT1="ID:1001" OPERATION="equals" INPUT2="1" TRUE="ID:1002" FALSE="" IGNORE="" />
<block id="1001" type="param__top&amp;lock (lock)[0]" x="10" y="264" w="243" SET="" />
<block id="1002" type="param__top&amp;prv (prv)[0]" x="712" y="388" w="243" SET="ID:1003" />
<block id="1003" type="param__top&amp;pgm (pgm)[0]" x="10" y="480" w="243" SET="" />
!!*/
/*!!<checksum>951fc827a3ffcf30388e3a1330c6c806</checksum>!!*/</task>
</param>
<param expand="true" height="60" left="100" oid="prv" showlabel="false" top="200" width="520"/>
<label height="20" left="100" name="PGM" style="txt-align:west" top="60" width="100"/>
<label height="20" left="100" name="PRV" style="txt-align:west" top="180" width="60"/>
<param expand="true" height="40" left="660" oid="lock" showlabel="false" top="140" width="100"/>
<button buttontype="push" height="60" left="860" name="<html><center>Take<br/>Swap PGM/PRV</center></html>" top="160" width="200">
<task tasktype="ogscript">
var temp = "";
/*! block id=1000,1001 !*/
temp = params.getValue('pgm', 0);
/*! block id=1003,1002 !*/
params.setValue('pgm', 0, params.getValue('prv', 0));
/*! block id=1005,1004 !*/
params.setValue('prv', 0, temp);
/*!!
<block id="1000" type="temp_Generic Variable_variable" x="406" y="169" w="243" color="#ee862a" SET="ID:1001" next="ID:1003" />
<block id="1001" type="param__top&amp;pgm (pgm)[0]" x="10" y="192" w="243" SET="" />
<block id="1003" type="param__top&amp;pgm (pgm)[0]" x="374" y="260" w="243" SET="ID:1002" next="ID:1005" />
<block id="1002" type="param__top&amp;prv (prv)[0]" x="10" y="284" w="243" SET="" />
<block id="1005" type="param__top&amp;prv (prv)[0]" x="376" y="362" w="243" SET="ID:1004" />
<block id="1004" type="temp_Generic Variable_variable" x="10" y="376" w="243" color="#ee862a" SET="" />
!!*/
/*!!<checksum>cd4868245f5bd4c5f8256f564e3d1130</checksum>!!*/</task>
</button>
<button buttontype="push" height="60" left="860" name="<html><center>Take<br/>PGM becomes PRV</center></html>" top="80" width="200">
<task tasktype="ogscript">/*! block id=1007,1006 !*/
params.setValue('pgm', 0, params.getValue('prv', 0));
/*!!
<block id="1007" type="param__top&amp;pgm (pgm)[0]" x="324" y="113" w="243" SET="ID:1006" />
<block id="1006" type="param__top&amp;prv (prv)[0]" x="10" y="100" w="243" SET="" />
!!*/
/*!!<checksum>5dc9e2abf70436e3f06ea32f24b4d303</checksum>!!*/</task>
</button>
</abs>
If you're talking about a TAKE button on another panel or UI, then it's slightly more complicated.
If it's a carbonite TAKE button, you could drag that button onto your panel. I believe that button is backed by a parameter (i.e. when someone presses the button, it changes a parameter to tell the Cabonite the button was pressed). We can then put a task on that parameter and do an additional task when the button is pressed. That way we could also change the PRV after the Carbonite has changed the PGM.
If that's what you are talking about, let me know and I can give a more comprehensive example. But I suspect you are talking about the first case.
#DashBoard