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.
Cam1
Cam2
Cam3
Video
XP
Presenter
Cam1
Cam2
Cam3
Video
XP
Presenter
On
75%
50%
25%
Off
Cam1
Cam2
Cam3
Video
XP
Presenter
Cam1
Cam2
Cam3
Video
XP
Presenter
On
75%
50%
25%
Off
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));
}
/*! block id=1000,1001,1002 !*/
ogscript.reveal(("top_tab" + params.getValue('program', 0)));
/*!!
!!*/
/*!!6101c215138606f16f5a9822a3fa7f4e!!*/
/*! block id=1003,1004,1006 !*/
ogscript.reveal(("bottom_tab" + params.getValue('preview', 0)));
/*!!
!!*/
/*!!52213b66fa9f6daa8672408f5d51fb22!!*/
var temp = params.getValue("program",0);
params.setValue("program", 0,params.getValue("preview",0));
params.setValue("preview", 0, temp);
30
selection
/! block id=1013,1014 !/
params.setValue(‘selection’, 0, 0);
/! block id=1018 !/
recallSelected()
/!!
!!/
/!!7eefd051806073b2bf293e6122ecf696!!/
/! block id=1015 !/
params.setValue(‘selection’, 0, params.getValue(‘selection’, 0) + 1);
/! block id=1019 !/
recallSelected()
/!!
!!/
/!!0295c511f0828a30bdf3c9539545594d!!/
/! block id=1016 !/
params.setValue(‘selection’, 0, params.getValue(‘selection’, 0) + -1);
/! block id=1020 !/
recallSelected()
/!!
!!/
/!!5183bc7045d27eb7e44a2475d85c5cb8!!/
/! block id=1017 !/
recallSelected()
/!!
!!/
/!!f3631071b9084b849eec34c59cdef151!!/
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);
}
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);
}
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);
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);
#DashBoard