Facility Control

 View Only
Expand all | Collapse all

Dashboard Drop Down list

Michael Olsen

Michael Olsen09-22-2020 15:24

  • 1.  Dashboard Drop Down list

    Posted 09-22-2020 14:31

    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 ? 



  • 2.  RE: Dashboard Drop Down list

    Posted 09-22-2020 14:45

    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":

    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


  • 3.  RE: Dashboard Drop Down list

    Posted 09-22-2020 15:09

    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. 

     

     

     

     


    #DashBoard


  • 4.  RE: Dashboard Drop Down list

    Posted 09-22-2020 15:22

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

     


    #DashBoard


  • 5.  RE: Dashboard Drop Down list

    Posted 09-22-2020 15:24

    to you mean this infomation 

     


    #DashBoard


  • 6.  RE: Dashboard Drop Down list

    Posted 09-22-2020 15:30

    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 "<meta>" section here (or even the entire source code).


    #DashBoard


  • 7.  RE: Dashboard Drop Down list

    Posted 09-22-2020 15:33

    Here is all 

     

    <abs contexttype="opengear" id="_top" keepalive="false">
    <meta>
    <params>
    <param access="1" maxlength="0" name="Ident" oid="0x2" precision="0" type="STRING_ARRAY" widget="text-display">
    <value>Ident</value>
    </param>
    <param access="1" maxlength="0" name="Navn" oid="0x3" precision="0" type="STRING_ARRAY" widget="text-display">
    <value>Navn</value>
    </param>
    <param access="1" maxlength="0" name="Title" oid="0x4" precision="0" type="STRING_ARRAY" widget="text-display">
    <value>Title</value>
    </param>
    <param access="1" maxlength="0" name="SubType" oid="0x5" precision="0" type="STRING_ARRAY" widget="text-display">
    <value>B</value>
    </param>
    <param access="1" maxlength="0" name="Subtype-c" oid="0x6" precision="0" type="STRING_ARRAY" widget="default">
    <value>sfd</value>
    <value>ada</value>
    <value>t1</value>
    </param>
    <param access="1" maxlength="0" name="SubNavn-c" oid="0x7" precision="0" type="STRING_ARRAY" widget="text-display">
    <value>asf</value>
    <value>dasd</value>
    <value>sub top 1</value>
    </param>
    <param access="1" maxlength="0" name="Sub Take ID" oid="0x8" precision="0" type="STRING_ARRAY" widget="text-display">
    <value>asd</value>
    <value>6</value>
    <value>5</value>
    </param>
    <param access="1" maxlength="0" name="Sub Prew ID" oid="0x9" precision="0" type="STRING_ARRAY" widget="text">
    <value>ad</value>
    <value>34</value>
    <value>90</value>
    </param>
    <param access="1" constrainttype="INT_CHOICE" name="Table Config" oid="Table_Config" precision="0" type="INT32" value="0" widget="default">
    <constraint key="6">Syb Type</constraint>
    <constraint key="7">Sub Navn</constraint>
    <constraint key="8">Take ID</constraint>
    <constraint key="9">Prev ID</constraint>
    </param>
    <param access="1" maxlength="0" name="syb-type-n" oid="sybtypen" type="STRING" value="" widget="text"/>
    <param access="1" maxlength="0" name="sub-n-n" oid="subnn" type="STRING" value="" widget="text"/>
    <param access="1" maxlength="0" name="take-id-n" oid="takeidn" type="STRING" value="" widget="text"/>
    <param access="1" maxlength="0" name="prev-n" oid="prevn" type="STRING" value="" widget="text"/>
    <param access="1" constrainttype="INT_NULL" name="div" oid="0xA" precision="0" type="INT16_ARRAY" value="0" widget="default"/>
    <param access="1" maxlength="0" name="o-st" oid="ost" type="STRING" value="" widget="default"/>
    <param access="1" maxlength="0" name="O-sn" oid="Osn" type="STRING" value="" widget="default"/>
    <param access="1" maxlength="0" name="O-ti" oid="Oti" type="STRING" value="" widget="default"/>
    <param access="1" maxlength="0" name="o-pi" oid="opi" type="STRING" value="" widget="default"/>
    <param access="1" constrainttype="INT_CHOICE" name="TEAT" oid="TEAT" precision="0" type="INT32" value="1" widget="combo">
    <constraint key="1">T1</constraint>
    </param>
    <param access="1" constrainttype="INT_CHOICE" name="Table list" oid="0xB" precision="0" type="INT32" value="1" widget="default">
    <constraint key="5">ID</constraint>
    <constraint key="3">Navn</constraint>
    <constraint key="4">Title</constraint>
    <constraint key="2">Sub Type</constraint>
    </param>
    </params>
    </meta>
    <tab height="1064" left="10" top="6" width="1898">
    <abs name="Afvikling" style="bg#tablezebra;" virtualheight="1080" virtualwidth="1920">
    <table bottom="8" right="1" top="0" width="512">
    <tr>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    <tr>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    <tr>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    <tr>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    <tr>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    <tr>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    <tr>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    <tr>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    <tr>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    <tr>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    </table>
    <param constrainttype="INT_CHOICE" expand="true" height="753" left="8" oid="0xB" precision="0" showlabel="false" top="2" widget="table" width="1359">
    <constraint key="2">ID</constraint>
    <constraint key="3">Navn</constraint>
    <constraint key="4">Title</constraint>
    <constraint key="5">Sub Type</constraint>
    </param>
    </abs>
    <abs name="Config">
    <meta>
    <ogscript/>
    <ogscript element="0" handles="onchange" oid="Table_Config">ogscript.debug(params.getValue('Table_Config', 0));
    params.setValue(0xA, 0, params.getValue('Table_Config', 0));</ogscript>
    </meta>
    <param constrainttype="INT_CHOICE" croll="true" expand="true" height="526" left="17" oid="Table_Config" precision="0" showlabel="false" top="25" widget="table" width="950">
    <constraint key="6">Sub Type</constraint>
    <constraint key="7">Sub Navn</constraint>
    <constraint key="8">Take ID</constraint>
    <constraint key="9">Prev ID</constraint>
    </param>
    <table height="78" left="15" top="562" width="953">
    <tr>
    <button buttontype="push" colspan="1" fill="both" name="Opret" rowspan="1" weightx="1.0" weighty="1.0">
    <task tasktype="ogscript">/*! block id=1016 !*/
    ogscript.reveal("c-opret");
    /*! block id=1017 !*/
    ogscript.hide("_top");
    /*!!
    &lt;block id="1016" type="ogscript_reveal" x="314" y="153" w="243" ID="c-opret" next="ID:1017" /&gt;
    &lt;block id="1017" type="ogscript_hide" x="317" y="284" w="243" ID="_top" /&gt;
    !!*/
    /*!!&lt;checksum&gt;b279a6e27ad82b64e6950d8750455a45&lt;/checksum&gt;!!*/</task>
    <task tasktype="ogscript">params.setValue('opi', 0, '');
    params.setValue('Osn', 0, '');
    params.setValue('ost', 0, '');
    params.setValue('Oti', 0, '');</task>
    </button>
    <button buttontype="push" colspan="1" fill="both" name="Rediger" rowspan="1" weightx="1.0" weighty="1.0">
    <task tasktype="ogscript">/*! block id=1018 !*/
    ogscript.reveal("c-edit");
    ogscript.hide("c-opret");</task>
    <task tasktype="ogscript"/>
    <task tasktype="ogscript">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);</task>
    </button>
    <button buttontype="push" colspan="1" fill="both" name="Slet" rowspan="1" weightx="1.0" weighty="1.0">
    <task tasktype="ogscript"/>
    <task tasktype="ogscript">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 );</task>
    </button>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    </table>
    <abs height="136" id="c-edit" left="18" name="c-edit" style="bg#000000;" top="659" width="952">
    <table bottom="8" left="0" right="5" top="4">
    <tr>
    <label colspan="1" fill="both" name="Sub Type" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <label colspan="1" fill="both" name="Sub Navn" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <label colspan="1" fill="both" name="Take ID" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <label colspan="1" fill="both" name="Prev ID" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <button buttontype="push" colspan="1" fill="both" name="Opdater" rowspan="1" weightx="1.0" weighty="1.0">
    <task tasktype="ogscript">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);</task>
    <task tasktype="ogscript">params.setValue('opi', 0, '');
    params.setValue('Osn', 0, '');
    params.setValue('ost', 0, '');
    params.setValue('Oti', 0, '');</task>
    </button>
    </tr>
    <tr>
    <param colspan="1" expand="true" fill="both" oid="ost" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <param colspan="1" expand="true" fill="both" oid="Osn" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <param colspan="1" expand="true" fill="both" oid="Oti" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <param colspan="1" expand="true" fill="both" oid="opi" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    </table>
    </abs>
    <abs height="137" id="c-opret" left="17" name="c-opret" style="bg#000000;" top="659" width="951">
    <table bottom="5" left="1" right="3" top="2">
    <tr>
    <label colspan="1" fill="both" name="Sub Type" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <label colspan="1" fill="both" name="Sub Navn" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <label colspan="1" fill="both" name="Take ID" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <label colspan="1" fill="both" name="Prev ID" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <button buttontype="push" colspan="1" fill="both" name="Opret" rowspan="1" style="size:Big;" weightx="1.0" weighty="1.0">
    <task tasktype="ogscript"/>
    <task tasktype="ogscript">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);</task>
    <task tasktype="ogscript">params.setValue('opi', 0, '');
    params.setValue('Osn', 0, '');
    params.setValue('ost', 0, '');
    params.setValue('Oti', 0, '');</task>
    </button>
    </tr>
    <tr>
    <param colspan="1" expand="true" fill="both" oid="ost" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <param colspan="1" expand="true" fill="both" oid="Osn" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <param colspan="1" expand="true" fill="both" oid="Oti" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <param colspan="1" expand="true" fill="both" oid="opi" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    </table>
    </abs>
    </abs>
    </tab>
    </abs>


    #DashBoard


  • 8.  RE: Dashboard Drop Down list

    Posted 09-22-2020 15:39

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

    <param access="1" constrainttype="STRING_CHOICE" maxlength="0" name="Subtype-c" oid="0x6" precision="0" type="STRING_ARRAY" widget="combo">
    <value>sfd</value>
    <value>sfd</value>
    <value>t1</value>
    <constraint>sfd</constraint>
    <constraint>ada</constraint>
    <constraint>t1</constraint>
    </param>

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

     


    #DashBoard


  • 9.  RE: Dashboard Drop Down list

    Posted 09-22-2020 15:54

    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 "   

     

     


    #DashBoard


  • 10.  RE: Dashboard Drop Down list

    Posted 09-22-2020 16:22

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


    #DashBoard


  • 11.  RE: Dashboard Drop Down list

    Posted 09-22-2020 16:25

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

    it is string

     

    <abs contexttype="opengear" id="_top" keepalive="false">
    <timer id="klokken" pattern="HH:mm:ss" rate="500">
    <timertask tasktype="ogparamset">params.setValue('kl', 0, event.getDisplay());</timertask>
    </timer>
    <meta>
    <params>
    <param access="1" maxlength="0" name="Ident" oid="0x2" precision="0" type="STRING_ARRAY" widget="text-display">
    <value>Ident</value>
    </param>
    <param access="1" maxlength="0" name="Navn" oid="0x3" precision="0" type="STRING_ARRAY" widget="text-display">
    <value>Navn</value>
    </param>
    <param access="1" maxlength="0" name="Title" oid="0x4" precision="0" type="STRING_ARRAY" widget="text-display">
    <value>Title</value>
    </param>
    <param access="1" maxlength="0" name="SubType" oid="0x5" precision="0" type="STRING_ARRAY" widget="text-display">
    <value>B</value>
    </param>
    <param access="1" maxlength="0" name="Subtype-c" oid="0x6" precision="0" type="STRING_ARRAY" widget="default">
    <value>sfd</value>
    <value>ada</value>
    <value>t1</value>
    </param>
    <param access="1" maxlength="0" name="SubNavn-c" oid="0x7" precision="0" type="STRING_ARRAY" widget="text-display">
    <value>asf</value>
    <value>dasd</value>
    <value>sub top 1</value>
    </param>
    <param access="1" maxlength="0" name="Sub Take ID" oid="0x8" precision="0" type="STRING_ARRAY" widget="text-display">
    <value>asd</value>
    <value>6</value>
    <value>5</value>
    </param>
    <param access="1" maxlength="0" name="Sub Prew ID" oid="0x9" precision="0" type="STRING_ARRAY" widget="text">
    <value>ad</value>
    <value>34</value>
    <value>90</value>
    </param>
    <param access="1" constrainttype="INT_CHOICE" name="Table Config" oid="Table_Config" precision="0" type="INT32" value="0" widget="default">
    <constraint key="6">Syb Type</constraint>
    <constraint key="7">Sub Navn</constraint>
    <constraint key="8">Take ID</constraint>
    <constraint key="9">Prev ID</constraint>
    </param>
    <param access="1" maxlength="0" name="syb-type-n" oid="sybtypen" type="STRING" value="" widget="text"/>
    <param access="1" maxlength="0" name="sub-n-n" oid="subnn" type="STRING" value="" widget="text"/>
    <param access="1" maxlength="0" name="take-id-n" oid="takeidn" type="STRING" value="" widget="text"/>
    <param access="1" maxlength="0" name="prev-n" oid="prevn" type="STRING" value="" widget="text"/>
    <param access="1" constrainttype="INT_NULL" name="div" oid="0xA" precision="0" type="INT16_ARRAY" value="0" widget="default"/>
    <param access="1" maxlength="0" name="o-st" oid="ost" type="STRING" value="" widget="default"/>
    <param access="1" maxlength="0" name="O-sn" oid="Osn" type="STRING" value="" widget="default"/>
    <param access="1" maxlength="0" name="O-ti" oid="Oti" type="STRING" value="" widget="default"/>
    <param access="1" maxlength="0" name="o-pi" oid="opi" type="STRING" value="" widget="default"/>
    <param access="1" constrainttype="INT_CHOICE" name="TEAT" oid="TEAT" precision="0" type="INT32" value="1" widget="combo">
    <constraint key="1">T1</constraint>
    </param>
    <param access="1" constrainttype="INT_CHOICE" name="Table list" oid="0xB" precision="0" type="INT32" value="1" widget="default">
    <constraint key="5">ID</constraint>
    <constraint key="3">Navn</constraint>
    <constraint key="4">Title</constraint>
    <constraint key="2">Sub Type</constraint>
    </param>
    <param access="1" constrainttype="INT_CHOICE" name="test" oid="test" precision="0" type="INT32" value="1" widget="combo">
    <constraint key="1">sfd</constraint>
    <constraint key="2">ada</constraint>
    <constraint key="3">t1</constraint>
    </param>
    <param access="1" maxlength="0" name="kl" oid="kl" type="STRING" value="18:23:04" widget="label"/>
    </params>
    </meta>
    <tab height="1064" left="10" top="6" width="1898">
    <abs name="Afvikling" style="bg#tablezebra;" virtualheight="1080" virtualwidth="1920">

    <param constrainttype="INT_CHOICE" evenstyle="f:size:Big;f:txt-align:center;" expand="true" height="753" left="8" oddstyle="f:size:Big;f:txt-align:center;" oid="0xB" precision="0" showlabel="false" top="2" widget="table" width="1359">
    <constraint key="2">ID</constraint>
    <constraint key="3">Navn</constraint>
    <constraint key="4">Title</constraint>
    <constraint key="5">Sub Type</constraint>
    </param>
    <widget height="353" name="CG1" right="-2" top="4" widgetid="com.rossvideo.xpression.preview" width="553">
    <config>
    <params>
    <param oid="preview_widget_channel" value="1"/>
    <param oid="preview_widget_show_channel" value="1"/>
    <param oid="preview_widget_show_name" value="1"/>
    </params>
    </config>
    </widget>
    <abs bottom="7" height="298" id="main" left="8" name="main" style="bg#listbg;" width="1359">
    <param colspan="5" expand="true" fill="both" height="427" oid="klokke" rowspan="3" style="style:timerLabel;size:150;" weightx="1.0" weighty="1.0" width="2033"/>
    <param bottom="7" expand="true" height="133" left="67" oid="kl" style="style:timerLabel;size:100;" width="536"/>
    <table bottom="-2" right="1" top="0" width="247">
    <tr>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    <tr>
    <button buttontype="push" colspan="1" fill="both" name="Opret" rowspan="1" style="size:Bigger;" weightx="1.0" weighty="1.0">
    <task tasktype="ogscript">/*! block id=1025 !*/
    ogscript.reveal("edit");
    /*! block id=1026 !*/
    ogscript.hide("main");
    /*!!
    &lt;block id="1025" type="ogscript_reveal" x="572" y="160" w="243" ID="edit" next="ID:1026" /&gt;
    &lt;block id="1026" type="ogscript_hide" x="605" y="298" w="243" ID="main" /&gt;
    !!*/
    /*!!&lt;checksum&gt;67463d996644a973f7b42c0edc380bc0&lt;/checksum&gt;!!*/</task>
    </button>
    </tr>
    <tr>
    <button buttontype="push" colspan="1" fill="both" name="Rediger" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    </table>
    </abs>
    <abs bottom="3" height="300" id="edit" left="2" name="edit" style="bg#listbg;" width="1363">
    <table bottom="5" right="2" top="0" width="255">
    <tr>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    <tr>
    <button buttontype="push" colspan="1" fill="both" name="GEM" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    <tr>
    <button buttontype="push" colspan="1" fill="both" name="Tilbage" rowspan="1" weightx="1.0" weighty="1.0">
    <task tasktype="ogscript">/*! block id=1027 !*/
    ogscript.reveal("main");
    /*! block id=1028 !*/
    ogscript.hide("edit");
    /*!!
    &lt;block id="1027" type="ogscript_reveal" x="601" y="168" w="243" ID="main" next="ID:1028" /&gt;
    &lt;block id="1028" type="ogscript_hide" x="557" y="372" w="243" ID="edit" /&gt;
    !!*/
    /*!!&lt;checksum&gt;7bc9567781888b8d20add27e6a5a229f&lt;/checksum&gt;!!*/</task>
    </button>
    </tr>
    </table>
    </abs>
    </abs>
    <abs name="Config">
    <meta>
    <ogscript/>
    <ogscript element="0" handles="onchange" oid="Table_Config">ogscript.debug(params.getValue('Table_Config', 0));
    params.setValue(0xA, 0, params.getValue('Table_Config', 0));</ogscript>
    </meta>
    <param constrainttype="INT_CHOICE" croll="true" expand="true" height="526" left="17" oid="Table_Config" precision="0" showlabel="false" top="25" widget="table" width="950">
    <constraint key="6">Sub Type</constraint>
    <constraint key="7">Sub Navn</constraint>
    <constraint key="8">Take ID</constraint>
    <constraint key="9">Prev ID</constraint>
    </param>
    <table height="78" left="15" top="562" width="953">
    <tr>
    <button buttontype="push" colspan="1" fill="both" name="Opret" rowspan="1" weightx="1.0" weighty="1.0">
    <task tasktype="ogscript">/*! block id=1016 !*/
    ogscript.reveal("c-opret");
    /*! block id=1017 !*/
    ogscript.hide("_top");
    /*!!
    &lt;block id="1016" type="ogscript_reveal" x="314" y="153" w="243" ID="c-opret" next="ID:1017" /&gt;
    &lt;block id="1017" type="ogscript_hide" x="317" y="284" w="243" ID="_top" /&gt;
    !!*/
    /*!!&lt;checksum&gt;b279a6e27ad82b64e6950d8750455a45&lt;/checksum&gt;!!*/</task>
    <task tasktype="ogscript">params.setValue('opi', 0, '');
    params.setValue('Osn', 0, '');
    params.setValue('ost', 0, '');
    params.setValue('Oti', 0, '');</task>
    </button>
    <button buttontype="push" colspan="1" fill="both" name="Rediger" rowspan="1" weightx="1.0" weighty="1.0">
    <task tasktype="ogscript">/*! block id=1018 !*/
    ogscript.reveal("c-edit");
    ogscript.hide("c-opret");</task>
    <task tasktype="ogscript"/>
    <task tasktype="ogscript">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);</task>
    </button>
    <button buttontype="push" colspan="1" fill="both" name="Slet" rowspan="1" weightx="1.0" weighty="1.0">
    <task tasktype="ogscript"/>
    <task tasktype="ogscript">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 );</task>
    </button>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    </table>
    <abs height="136" id="c-edit" left="18" name="c-edit" style="bg#000000;" top="659" width="952">
    <table bottom="8" left="0" right="5" top="4">
    <tr>
    <label colspan="1" fill="both" name="Sub Type" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <label colspan="1" fill="both" name="Sub Navn" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <label colspan="1" fill="both" name="Take ID" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <label colspan="1" fill="both" name="Prev ID" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <button buttontype="push" colspan="1" fill="both" name="Opdater" rowspan="1" weightx="1.0" weighty="1.0">
    <task tasktype="ogscript">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);</task>
    <task tasktype="ogscript">params.setValue('opi', 0, '');
    params.setValue('Osn', 0, '');
    params.setValue('ost', 0, '');
    params.setValue('Oti', 0, '');</task>
    </button>
    </tr>
    <tr>
    <param colspan="1" expand="true" fill="both" oid="ost" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <param colspan="1" expand="true" fill="both" oid="Osn" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <param colspan="1" expand="true" fill="both" oid="Oti" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <param colspan="1" expand="true" fill="both" oid="opi" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    </table>
    </abs>
    <abs height="137" id="c-opret" left="17" name="c-opret" style="bg#000000;" top="659" width="951">
    <table bottom="5" left="1" right="3" top="2">
    <tr>
    <label colspan="1" fill="both" name="Sub Type" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <label colspan="1" fill="both" name="Sub Navn" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <label colspan="1" fill="both" name="Take ID" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <label colspan="1" fill="both" name="Prev ID" rowspan="1" style="txt-align:center;bg-align:center;font:default;size:Big;" weightx="1.0" weighty="1.0"/>
    <button buttontype="push" colspan="1" fill="both" name="Opret" rowspan="1" style="size:Big;" weightx="1.0" weighty="1.0">
    <task tasktype="ogscript"/>
    <task tasktype="ogscript">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);</task>
    <task tasktype="ogscript">params.setValue('opi', 0, '');
    params.setValue('Osn', 0, '');
    params.setValue('ost', 0, '');
    params.setValue('Oti', 0, '');</task>
    </button>
    </tr>
    <tr>
    <param colspan="1" expand="true" fill="both" oid="ost" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <param colspan="1" expand="true" fill="both" oid="Osn" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <param colspan="1" expand="true" fill="both" oid="Oti" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <param colspan="1" expand="true" fill="both" oid="opi" rowspan="1" style="bdr:shadow;grid#lightdivider;bdr#lightdivider;txt-align:center;" weightx="1.0" weighty="1.0"/>
    <dropspot colspan="1" fill="both" rowspan="1" weightx="1.0" weighty="1.0"/>
    </tr>
    </table>
    </abs>
    <param expand="true" height="46" left="1046" oid="test" top="483" width="265"/>
    <label height="50" left="1058" name="SUB Type " style="txt-align:center" top="426" width="237"/>
    </abs>
    </tab>
    </abs>


    #DashBoard


  • 12.  RE: Dashboard Drop Down list

    Posted 09-22-2020 16:27

    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


  • 13.  RE: Dashboard Drop Down list

    Posted 09-22-2020 16:44

    Is this what you were looking for?


    #DashBoard


  • 14.  RE: Dashboard Drop Down list

    Posted 09-22-2020 17:11

    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


  • 15.  RE: Dashboard Drop Down list

    Posted 09-22-2020 17:39

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


    #DashBoard