# Dashboard Drop Down list

**URL:** <https://rossvideo.community/t/dashboard-drop-down-list/8489>\
**Category:** Automation & Control\
**Created:** [September 22, 2020, 6:31pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489 "2020-09-22T18:31:00Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelolsen](https://rossvideo.community/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@michaelolsen](https://rossvideo.community/u/michaelolsen)\
**Post date:** [September 22, 2020, 6:31pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/1 "2020-09-22T18:31:00Z")

</div>

Hi all

I have build a panel where i have an array, where i can insert data works fin, but how can i make that arry to be listed in a dropdown box ?

---

<div class="post-metadata">

**Author:** ![bengatien](https://rossvideo.community/letter_avatar_proxy/v4/letter/b/b5a626/32.png) [@bengatien](https://rossvideo.community/u/bengatien)\
**Post date:** [September 22, 2020, 6:45pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/2 "2020-09-22T18:45:00Z")

</div>

Hi Michael,

It sounds as if you might have your terms mixed up.

An array is a list of items. If a parameter is an array, it has multiple values. For example, I could have a parameter that tells me on which days I need to trigger something, and that parameter could have the multiple values, like: “Monday, Wednesday, Friday”.

A constraint is a list of choices that a parameter can have. So I could have a parameter that hods the current day of the week. It only has one value (“Tuesday”) but it has a list of choices (constraints): “Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday”. A parameter with a “choice constraint” can easily be shown as a dropdown list. That dropdown has multiple choices, but just one value.

I think that is what you are asking. If that is what you want, you need to make your parameter a “Choice Constraint”:

 ![](https://discourse-rossvideo-uploads-east2.s3.dualstack.us-east-2.amazonaws.com/original/1X/72fbb9770d9e7006159d267b7433b1d625bde058.png)

Put the possible values you want in the dropdown list in the Constraint Value box, and use an “Editable Dropdown List” as the Widget Hint.

If I misunderstood, and you still want your parameter to have multiple values, then let me know. Each of those values could be listed in it’s own dropdown list.

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![michaelolsen](https://rossvideo.community/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@michaelolsen](https://rossvideo.community/u/michaelolsen)\
**Post date:** [September 22, 2020, 7:09pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/3 "2020-09-22T19:09:00Z")

</div>

Thanks for you answer, that was also how i have made it first, but now i building a new version where I have make a Table as below picture, where i want is that my first list “Syb Type” schould on other page be listed in a “drop down” ?? is that possible and if so how do i do it.

 ![](https://discourse-rossvideo-uploads-east2.s3.dualstack.us-east-2.amazonaws.com/original/1X/3dacec46ee42d20e747554fb90d7df62fbfc42da.png)

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![bengatien](https://rossvideo.community/letter_avatar_proxy/v4/letter/b/b5a626/32.png) [@bengatien](https://rossvideo.community/u/bengatien)\
**Post date:** [September 22, 2020, 7:22pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/4 "2020-09-22T19:22:00Z")

</div>

Can you copy and paste your parameter definition here. It would help me show you how to achieve what you want.

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![michaelolsen](https://rossvideo.community/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@michaelolsen](https://rossvideo.community/u/michaelolsen)\
**Post date:** [September 22, 2020, 7:24pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/5 "2020-09-22T19:24:00Z")

</div>

to you mean this infomation

 ![](https://discourse-rossvideo-uploads-east2.s3.dualstack.us-east-2.amazonaws.com/original/1X/09badf306f05f08b4ad7eea3baa5787593807040.png)

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![bengatien](https://rossvideo.community/letter_avatar_proxy/v4/letter/b/b5a626/32.png) [@bengatien](https://rossvideo.community/u/bengatien)\
**Post date:** [September 22, 2020, 7:30pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/6 "2020-09-22T19:30:00Z")

</div>

If you double click anywhere empty in your panel (in panelbuilder mode), it will show you the tree of the entire panel. Then click on the “source” tab at the top. Copy and paste the “” section here (or even the entire source code).

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![michaelolsen](https://rossvideo.community/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@michaelolsen](https://rossvideo.community/u/michaelolsen)\
**Post date:** [September 22, 2020, 7:33pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/7 "2020-09-22T19:33:00Z")

</div>

Here is all

Ident Navn Title B sfd ada t1 asf dasd sub top 1 asd 6 5 ad 34 90 Syb Type Sub Navn Take ID Prev ID T1 ID Navn Title Sub Type

|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |

ID Navn Title Sub Type ogscript.debug(params.getValue('Table\_Config', 0)); params.setValue(0xA, 0, params.getValue('Table\_Config', 0)); Sub Type Sub Navn Take ID Prev ID /\*! block id=1016 !\*/ ogscript.reveal("c-opret"); /\*! block id=1017 !\*/ ogscript.hide("\_top"); /\*!! !!\*/ /\*!!b279a6e27ad82b64e6950d8750455a45!!\*/ params.setValue('opi', 0, ''); params.setValue('Osn', 0, ''); params.setValue('ost', 0, ''); params.setValue('Oti', 0, ''); /\*! block id=1018 !\*/ ogscript.reveal("c-edit"); ogscript.hide("c-opret"); var id = params.getValue(0xA, 0);

var a = params.getValue(0x6, id);  
var b = params.getValue(0x7, id);  
var c = params.getValue(0x8, id);  
var d = params.getValue(0x9, id);

params.setValue(‘ost’, 0, a);  
params.setValue(‘Osn’, 0, b);  
params.setValue(‘Oti’, 0, c);  
params.setValue(‘opi’, 0, d);

ogscript.debug(id);  
  
  
  
var id = params.getValue(0xA, 0);

params.getParam(0x6, id).remove();  
params.getParam(0x7, id).remove();  
params.getParam(0x8, id).remove();  
params.getParam(0x9, id).remove();

ogscript.debug("slettede linje " + id );

|
| |

var id = params.getValue('0xA', 0)

ogscript.debug(id);

var a = params.getValue(‘ost’, 0);  
var b = params.getValue(‘Osn’, 0);  
var c = params.getValue(‘Oti’, 0);  
var d = params.getValue(‘opi’, 0);

params.setValue(0x6, id, a);  
params.setValue(0x7, id, b);  
params.setValue(0x8, id, c);  
params.setValue(0x9, id, d);  
params.setValue(‘opi’, 0, ‘’);  
params.setValue(‘Osn’, 0, ‘’);  
params.setValue(‘ost’, 0, ‘’);  
params.setValue(‘Oti’, 0, ‘’);

|
| |
|
| |

var id = params.getParam("0x6",0); var idc = id.getElementCount(); ogscript.debug(idc);

var p = params.getValue(‘opi’, 0);  
var sn = params.getValue(‘Osn’, 0);  
var st = params.getValue(‘ost’, 0);  
var ti = params.getValue(‘Oti’, 0);

params.setValue(0x6, idc, st);  
params.setValue(0x7, idc, sn);  
params.setValue(0x8, idc, ti);  
params.setValue(0x9, idc, p);  
params.setValue(‘opi’, 0, ‘’);  
params.setValue(‘Osn’, 0, ‘’);  
params.setValue(‘ost’, 0, ‘’);  
params.setValue(‘Oti’, 0, ‘’);

|
| |
|
| |

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![bengatien](https://rossvideo.community/letter_avatar_proxy/v4/letter/b/b5a626/32.png) [@bengatien](https://rossvideo.community/u/bengatien)\
**Post date:** [September 22, 2020, 7:39pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/8 "2020-09-22T19:39:00Z")

</div>

If should work if you add a constraint to your first parameter and change the widget, like this (I bolded the parts I changed):

sfd sfd t1 sfd ada t1

When the user clicks in the table, a dropdown will appear.

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![michaelolsen](https://rossvideo.community/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@michaelolsen](https://rossvideo.community/u/michaelolsen)\
**Post date:** [September 22, 2020, 7:54pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/9 "2020-09-22T19:54:00Z")

</div>

thanks i see it , but not what i was look for

i have my table below that my template they user can , so on front page i would like to have a dropdown box that list all item from parameter "Sub type "

 ![](https://discourse-rossvideo-uploads-east2.s3.dualstack.us-east-2.amazonaws.com/original/1X/17289d9f4d53df64d96b261b3c686342125a2099.png)

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![antonygiraldo](https://rossvideo.community/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@antonygiraldo](https://rossvideo.community/u/antonygiraldo)\
**Post date:** [September 22, 2020, 8:22pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/10 "2020-09-22T20:22:00Z")

</div>

What is the oid of your drop downlist param and what data type is it, string or integer?

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![michaelolsen](https://rossvideo.community/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@michaelolsen](https://rossvideo.community/u/michaelolsen)\
**Post date:** [September 22, 2020, 8:25pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/11 "2020-09-22T20:25:00Z")

</div>

I have add dropdown aften my first share of code but it has OID test

it is string

params.setValue('kl', 0, event.getDisplay()); Ident Navn Title B sfd ada t1 asf dasd sub top 1 asd 6 5 ad 34 90 Syb Type Sub Navn Take ID Prev ID T1 ID Navn Title Sub Type sfd ada t1 ID Navn Title Sub Type /\*! block id=1025 !\*/ ogscript.reveal("edit"); /\*! block id=1026 !\*/ ogscript.hide("main"); /\*!! !!\*/ /\*!!67463d996644a973f7b42c0edc380bc0!!\*/

|
| |
|
| |
|
| |

/\*! block id=1027 !\*/ ogscript.reveal("main"); /\*! block id=1028 !\*/ ogscript.hide("edit"); /\*!! !!\*/ /\*!!7bc9567781888b8d20add27e6a5a229f!!\*/

|
| |
|
| |
|
| |

ogscript.debug(params.getValue('Table\_Config', 0)); params.setValue(0xA, 0, params.getValue('Table\_Config', 0)); Sub Type Sub Navn Take ID Prev ID /\*! block id=1016 !\*/ ogscript.reveal("c-opret"); /\*! block id=1017 !\*/ ogscript.hide("\_top"); /\*!! !!\*/ /\*!!b279a6e27ad82b64e6950d8750455a45!!\*/ params.setValue('opi', 0, ''); params.setValue('Osn', 0, ''); params.setValue('ost', 0, ''); params.setValue('Oti', 0, ''); /\*! block id=1018 !\*/ ogscript.reveal("c-edit"); ogscript.hide("c-opret"); var id = params.getValue(0xA, 0);

var a = params.getValue(0x6, id);  
var b = params.getValue(0x7, id);  
var c = params.getValue(0x8, id);  
var d = params.getValue(0x9, id);

params.setValue(‘ost’, 0, a);  
params.setValue(‘Osn’, 0, b);  
params.setValue(‘Oti’, 0, c);  
params.setValue(‘opi’, 0, d);

ogscript.debug(id);  
  
  
  
var id = params.getValue(0xA, 0);

params.getParam(0x6, id).remove();  
params.getParam(0x7, id).remove();  
params.getParam(0x8, id).remove();  
params.getParam(0x9, id).remove();

ogscript.debug("slettede linje " + id );

|
| |

var id = params.getValue('0xA', 0)

ogscript.debug(id);

var a = params.getValue(‘ost’, 0);  
var b = params.getValue(‘Osn’, 0);  
var c = params.getValue(‘Oti’, 0);  
var d = params.getValue(‘opi’, 0);

params.setValue(0x6, id, a);  
params.setValue(0x7, id, b);  
params.setValue(0x8, id, c);  
params.setValue(0x9, id, d);  
params.setValue(‘opi’, 0, ‘’);  
params.setValue(‘Osn’, 0, ‘’);  
params.setValue(‘ost’, 0, ‘’);  
params.setValue(‘Oti’, 0, ‘’);

|
| |
|
| |

var id = params.getParam("0x6",0); var idc = id.getElementCount(); ogscript.debug(idc);

var p = params.getValue(‘opi’, 0);  
var sn = params.getValue(‘Osn’, 0);  
var st = params.getValue(‘ost’, 0);  
var ti = params.getValue(‘Oti’, 0);

params.setValue(0x6, idc, st);  
params.setValue(0x7, idc, sn);  
params.setValue(0x8, idc, ti);  
params.setValue(0x9, idc, p);  
params.setValue(‘opi’, 0, ‘’);  
params.setValue(‘Osn’, 0, ‘’);  
params.setValue(‘ost’, 0, ‘’);  
params.setValue(‘Oti’, 0, ‘’);

|
| |
|
| |

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![antonygiraldo](https://rossvideo.community/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@antonygiraldo](https://rossvideo.community/u/antonygiraldo)\
**Post date:** [September 22, 2020, 8:27pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/12 "2020-09-22T20:27:00Z")

</div>

here is your script:

var count = params.getElementCount(0x6);  
var array = ;  
for (var i = 0; i \< count; i++)  
{  
array.push(params.getValue(0x6, i));  
}

var choiceConstraint = params.createStringChoiceConstraint(array);  
params.replaceConstraint(“test”, choiceConstraint);

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![antonygiraldo](https://rossvideo.community/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@antonygiraldo](https://rossvideo.community/u/antonygiraldo)\
**Post date:** [September 22, 2020, 8:44pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/13 "2020-09-22T20:44:00Z")

</div>

Is this what you were looking for?

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![michaelolsen](https://rossvideo.community/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@michaelolsen](https://rossvideo.community/u/michaelolsen)\
**Post date:** [September 22, 2020, 9:11pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/14 "2020-09-22T21:11:00Z")

</div>

have have now insert your code on a button, but after press the button it don´t update the choiceConstrain

and i have debug to see what i get and the data from array are fine, but not correct sent to Choise

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)

---

<div class="post-metadata">

**Author:** ![michaelolsen](https://rossvideo.community/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@michaelolsen](https://rossvideo.community/u/michaelolsen)\
**Post date:** [September 22, 2020, 9:39pm UTC](https://rossvideo.community/t/dashboard-drop-down-list/8489/15 "2020-09-22T21:39:00Z")

</div>

after some more test i have now got your code to work and it works as it schould. Thanks for you help

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)
