In the example panels (https://support.rossvideo.com/hc/en-us/community/posts/360065970252-Free-DashBoard-Example-Panels-for-Everyone), there is a folder called "Parameters". In there there is one for Arrays, then StructuredParam, and then StructuredParamArray, which build up to making a table of information using a structured parameter that's an array.
Structured parameters are great for holding a lot of data in one parameter and being able to loop through all that data, or display it all in one place. Imagine you want to have all the data about a sports team, including the first name and last name of each player, their jersey number.
If you have 20 players, you could create 60 different parameters to hold all this data. E.g. player1_fname, player2_fname, player3_fname, etc. Then you would have to put all 60 parameters on your panel to see all the data. Which is hard to do.
Then someone decided there should be 24 players instead of 20. You have to modify your panel and add 12 new parameters. It's hard to maintain.
Instead you could use subparams in an structured parameter, and use an array of them to make a table. That way all your data is in one parameter. You can drop that parameter in your panel and see all the data. The array also means that you can have a variable amount of data.
Here is another one I just created for other reasons which creates a "RunDown" type of panel.
<abs contexttype="opengear" gridsize="20" id="_top" keepalive="false">
<meta>
<params>
<param access="1" constrainttype="STRUCT" name="recall_template" oid="recall_template" type="STRUCT" widget="table">
<value>
<subparam access="1" maxlength="0" name="Name" suboid="name" type="STRING" value="Recall" widget="default"/>
<subparam access="1" constrainttype="INT_CHOICE" name="Program" precision="0" suboid="program" type="INT16" value="1000" widget="default">
<constraint key="1000">Cam1</constraint>
<constraint key="1001">Cam2</constraint>
<constraint key="1002">Cam3</constraint>
<constraint key="1003">Video</constraint>
<constraint key="1004">XP</constraint>
<constraint key="1005">Presenter</constraint>
</subparam>
<subparam access="1" constrainttype="INT_CHOICE" name="Preview" precision="0" suboid="preview" type="INT16" value="1000" widget="default">
<constraint key="1000">Cam1</constraint>
<constraint key="1001">Cam2</constraint>
<constraint key="1002">Cam3</constraint>
<constraint key="1003">Video</constraint>
<constraint key="1004">XP</constraint>
<constraint key="1005">Presenter</constraint>
</subparam>
<subparam access="1" constrainttype="INT_CHOICE" name="Lights" precision="0" suboid="lights" type="INT16" value="1000" widget="default">
<constraint key="1">On</constraint>
<constraint key="2">75%</constraint>
<constraint key="3">50%</constraint>
<constraint key="4">25%</constraint>
<constraint key="5">Off</constraint>
</subparam>
</value>
</param>
<param access="1" constrainttype="STRUCT" name="recall_template" oid="recalls" templateoid="recall_template" type="STRUCT_ARRAY" widget="table">
<value>
<subparam suboid="name" value="PreShow"/>
<subparam suboid="program" value="1003"/>
<subparam suboid="preview" value="1000"/>
<subparam suboid="lights" value="4"/>
</value>
<value>
<subparam suboid="name" value="Opening"/>
<subparam suboid="program" value="1000"/>
<subparam suboid="preview" value="1004"/>
<subparam suboid="lights" value="1"/>
</value>
<value>
<subparam suboid="name" value="First Event"/>
<subparam suboid="program" value="1002"/>
<subparam suboid="preview" value="1002"/>
<subparam suboid="lights" value="2"/>
</value>
<value>
<subparam suboid="name" value="Second Event"/>
<subparam suboid="program" value="1005"/>
<subparam suboid="preview" value="1004"/>
<subparam suboid="lights" value="3"/>
</value>
<value>
<subparam suboid="name" value="Third Event"/>
<subparam suboid="program" value="1001"/>
<subparam suboid="preview" value="1001"/>
<subparam suboid="lights" value="4"/>
</value>
<value>
<subparam suboid="name" value="Fourth Event"/>
<subparam suboid="program" value="1001"/>
<subparam suboid="preview" value="1003"/>
<subparam suboid="lights" value="2"/>
</value>
<value>
<subparam suboid="name" value="Fifth Event"/>
<subparam suboid="program" value="1004"/>
<subparam suboid="preview" value="1002"/>
<subparam suboid="lights" value="4"/>
</value>
<value>
<subparam suboid="name" value="Show End"/>
<subparam suboid="program" value="1003"/>
<subparam suboid="preview" value="1003"/>
<subparam suboid="lights" value="5"/>
</value>
</param>
<param access="1" constrainttype="INT_NULL" name="selection" oid="selection" precision="0" type="INT16" value="2" widget="default"/>
<param access="1" constrainttype="INT_CHOICE" name="program" oid="program" precision="0" type="INT16" value="1005" widget="radio-toggle">
<constraint key="1000">Cam1</constraint>
<constraint key="1001">Cam2</constraint>
<constraint key="1002">Cam3</constraint>
<constraint key="1003">Video</constraint>
<constraint key="1004">XP</constraint>
<constraint key="1005">Presenter</constraint>
</param>
<param access="1" constrainttype="INT_CHOICE" name="preview" oid="preview" precision="0" type="INT16" value="1005" widget="radio-toggle">
<constraint key="1000">Cam1</constraint>
<constraint key="1001">Cam2</constraint>
<constraint key="1002">Cam3</constraint>
<constraint key="1003">Video</constraint>
<constraint key="1004">XP</constraint>
<constraint key="1005">Presenter</constraint>
</param>
<param access="1" constrainttype="INT_CHOICE" name="lights" oid="lights" precision="0" type="INT16" value="1" widget="radio-toggle">
<constraint key="1">On</constraint>
<constraint key="2">75%</constraint>
<constraint key="3">50%</constraint>
<constraint key="4">25%</constraint>
<constraint key="5">Off</constraint>
</param>
<param access="1" maxlength="0" name="store name" oid="store_name" type="STRING" value="AfterShow" widget="default"/>
</params>
<api>function recallSelected() {
var selected = params.getValue("selection",0);
params.setValue("program",0,params.getValue("recalls." + selected + ".program",0));
params.setValue("preview",0,params.getValue("recalls." + selected + ".preview",0));
params.setValue("lights",0,params.getValue("recalls." + selected + ".lights",0));
}</api>
</meta>
<split bottom="0" left="0" orientation="horizontal" right="0" top="0">
<abs weight="0.5">
<param expand="true" height="40" left="50" oid="program" right="150" showlabel="false" style="size:Small;t:bg#red;f:bg#buttonbg;" top="40">
<task tasktype="ogscript">/*! block id=1000,1001,1002 !*/
ogscript.reveal(("top_tab" + params.getValue('program', 0)));
/*!!
<block id="1000" type="ogscript_reveal" x="408" y="108" w="243" ID="ID:1001" />
<block id="1001" type="math_add" x="212" y="214" VALUE="top_tab" VAL_1="ID:1002" w="218" VAL_1_1="" />
<block id="1002" type="param__top&amp;program (program)[0]" x="10" y="354" w="243" SET="" />
!!*/
/*!!<checksum>6101c215138606f16f5a9822a3fa7f4e</checksum>!!*/</task>
</param>
<param expand="true" height="40" left="50" oid="preview" right="150" showlabel="false" style="size:Small;t:bg#green;f:bg#buttonbg;" top="100">
<task tasktype="ogscript">/*! block id=1003,1004,1006 !*/
ogscript.reveal(("bottom_tab" + params.getValue('preview', 0)));
/*!!
<block id="1003" type="ogscript_reveal" x="539" y="60" w="243" ID="ID:1004" />
<block id="1004" type="math_add" x="319" y="104" VALUE="bottom_tab" VAL_1="ID:1006" w="218" VAL_1_1="" />
<block id="1006" type="param__top&amp;preview (preview)[0]" x="10" y="262" w="243" SET="" />
!!*/
/*!!<checksum>52213b66fa9f6daa8672408f5d51fb22</checksum>!!*/</task>
</param>
<button buttontype="push" height="100" name="Cut" right="50" top="40" width="80">
<task tasktype="ogscript">var temp = params.getValue("program",0);
params.setValue("program", 0,params.getValue("preview",0));
params.setValue("preview", 0, temp);</task>
</button>
<simplegrid bottom="100" left="50" right="50" rows="2" top="160" vspace="10">
<tab tabposition="none">
<abs id="top_tab1000" name="Tab 1">
<label bottom="0" left="0" name="CAM1" right="0" style="txt-align:center;size:Biggest;bg#orange;" top="0"/>
</abs>
<abs id="top_tab1001" name="Tab 2">
<label bottom="0" left="0" name="CAM2" right="0" style="txt-align:center;size:Biggest;bg#green;" top="0"/>
</abs>
<abs id="top_tab1002" name="Tab 3">
<label bottom="0" left="0" name="CAM3" right="0" style="txt-align:center;size:Biggest;bg#red;" top="0"/>
</abs>
<abs id="top_tab1003" name="Tab 4">
<label bottom="0" left="0" name="VIDEO" right="0" style="txt-align:center;size:Biggest;bg#purple;" top="0"/>
</abs>
<abs id="top_tab1004" name="Tab 5">
<label bottom="0" left="0" name="XPRESSION" right="0" style="txt-align:center;size:Biggest;bg#pink;" top="0"/>
</abs>
<abs id="top_tab1005" name="Tab 6">
<label bottom="0" left="0" name="PRESENTER" right="0" style="txt-align:center;size:Biggest;bg#blue;" top="0"/>
</abs>
</tab>
<tab tabposition="none">
<abs id="bottom_tab1000" name="Tab 1">
<label bottom="0" left="0" name="CAM1" right="0" style="txt-align:center;size:Biggest;bg#orange;" top="0"/>
</abs>
<abs id="bottom_tab1001" name="Tab 2">
<label bottom="0" left="0" name="CAM2" right="0" style="txt-align:center;size:Biggest;bg#green;" top="0"/>
</abs>
<abs id="bottom_tab1002" name="Tab 3">
<label bottom="0" left="0" name="CAM3" right="0" style="txt-align:center;size:Biggest;bg#red;" top="0"/>
</abs>
<abs id="bottom_tab1003" name="Tab 4">
<label bottom="0" left="0" name="VIDEO" right="0" style="txt-align:center;size:Biggest;bg#purple;" top="0"/>
</abs>
<abs id="bottom_tab1004" name="Tab 5">
<label bottom="0" left="0" name="XPRESSION" right="0" style="txt-align:center;size:Biggest;bg#pink;" top="0"/>
</abs>
<abs id="bottom_tab1005" name="Tab 6">
<label bottom="0" left="0" name="PRESENTER" right="0" style="txt-align:center;size:Biggest;bg#blue;" top="0"/>
</abs>
</tab>
</simplegrid>
<table bottom="20" height="60" left="50" oid="lights" right="50">
<tr>
<label anchor="east" fill="none" insets="0,0,0,5" name="lights" weightx="0.0"/>
<param anchor="west" expand="true" fill="both" oid="lights" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
</table>
</abs>
<abs>
<table bottom="20" left="20" right="20" top="100">
<tr>
<param colspan="1" expand="true" fill="both" oid="recalls" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0">
<config key="w.rowheight">30</config>
<config key="w.selectionparam">selection</config>
</param>
<simplegrid cols="1" expand="true" fill="both" insets="0,20,0,0" weightx="0.0" weighty="1.0" width="120">
<button buttontype="push" name="Start">
<task tasktype="ogscript">
/*! block id=1013,1014 !*/
params.setValue('selection', 0, 0);
/*! block id=1018 !*/
recallSelected()
/*!!
<block id="1013" type="param__top&amp;selection (selection)[0]" x="208" y="10" w="243" SET="ID:1014" next="ID:1018" />
<block id="1014" type="integer" x="10" y="10" w="168" VALUE="0" />
<block id="1018" type="function_recallSelected" x="208" y="82" w="243" />
!!*/
/*!!<checksum>7eefd051806073b2bf293e6122ecf696</checksum>!!*/</task>
</button>
<button buttontype="push" name="Next">
<task tasktype="ogscript">
/*! block id=1015 !*/
params.setValue('selection', 0, params.getValue('selection', 0) + 1);
/*! block id=1019 !*/
recallSelected()
/*!!
<block id="1015" type="math_increment_param" x="10" y="10" w="363" PARAM="[root, Params for RundownStart.grid, Not In Menu, selection (selection)]" VALUE="1" next="ID:1019" />
<block id="1019" type="function_recallSelected" x="10" y="106" w="243" />
!!*/
/*!!<checksum>0295c511f0828a30bdf3c9539545594d</checksum>!!*/</task>
</button>
<button buttontype="push" name="Prev">
<task tasktype="ogscript">
/*! block id=1016 !*/
params.setValue('selection', 0, params.getValue('selection', 0) + -1);
/*! block id=1020 !*/
recallSelected()
/*!!
<block id="1016" type="math_increment_param" x="10" y="10" w="353" PARAM="[root, Params for RundownStart.grid, Not In Menu, selection (selection)]" VALUE="-1" next="ID:1020" />
<block id="1020" type="function_recallSelected" x="10" y="106" w="243" />
!!*/
/*!!<checksum>5183bc7045d27eb7e44a2475d85c5cb8</checksum>!!*/</task>
</button>
<abs/>
<button buttontype="push" name="Recall Selected">
<task tasktype="ogscript">/*! block id=1017 !*/
recallSelected()
/*!!
<block id="1017" type="function_recallSelected" x="10" y="100" w="243" />
!!*/
/*!!<checksum>f3631071b9084b849eec34c59cdef151</checksum>!!*/</task>
</button>
<abs/>
<button buttontype="push" name="Move Up">
<task tasktype="ogscript">var newarray = new Array();
var index = params.getValue("selection",0);
if (index>0) {
// Recreate the array of values, with a new order.
var count = params.getElementCount("recalls");
for (var i=0; i < count; i++) {
if (i == index-1) {
newarray.push(params.getValue("recalls",index));
continue;
}
if (i == index) {
newarray.push(params.getValue("recalls",index-1));
continue;
}
newarray.push(params.getValue("recalls",i));
}
params.setAllValues("recalls", newarray);
params.setValue("selection",0,index-1);
}</task>
</button>
<button buttontype="push" name="Move Down">
<task tasktype="ogscript">var newarray = new Array();
var index = params.getValue("selection",0);
var count = params.getElementCount("recalls");
if (index<count-1) {
// Recreate the array with a new order.
for (var i=0; i < count; i++) {
if (i == index+1) {
newarray.push(params.getValue("recalls",index));
continue;
}
if (i == index) {
newarray.push(params.getValue("recalls",index+1));
continue;
}
newarray.push(params.getValue("recalls",i));
}
params.setAllValues("recalls", newarray);
params.setValue("selection",0,index+1);
}</task>
</button>
<abs/>
<button buttontype="push" name="Delete">
<task tasktype="ogscript">
var index = params.getValue("selection",0);
var newarray = new Array();
var count = params.getElementCount("recalls");
// recreate the array, but leave out the one that is selected.
for (var i=0; i < count; i++) {
if (i != index) {
newarray.push(params.getValue("recalls",i));
}
}
params.setAllValues("recalls", newarray);</task>
</button>
</simplegrid>
</tr>
<tr>
<param colspan="1" expand="true" fill="both" insets="10,0,10,0" oid="store_name" rowspan="1" showlabel="false" weightx="0.99" weighty="0.0"/>
<button buttontype="push" colspan="1" fill="both" insets="10,20,10,0" name="Add to Rundown" rowspan="1" weightx="0.0" weighty="0.0" width="60">
<task tasktype="ogscript">
var newrecall = {
name: params.getValue("store_name",0),
program: params.getValue("program",0),
preview: params.getValue("preview",0),
lights: params.getValue("lights",0),
};
var count = params.getElementCount("recalls");
var p = params.getParam("recalls",0);
p.setValueAt(count, newrecall);</task>
</button>
</tr>
</table>
<label height="60" left="20" name="Rundown" style="txt-align:west;size:Bigger;" top="40" width="400"/>
<param expand="true" height="20" oid="selection" right="24" showlabel="false" top="60" width="80"/>
<label height="20" name="Currently Selected:" right="84" style="txt-align:west;" top="60" width="140"/>
</abs>
</split>
</abs>
#DashBoard