Facility Control

 View Only
  • 1.  Help with Dashboard Panel to Xpression

    Posted 09-13-2016 03:56
    I am new to Xpression and Dashboard!! I have limited experience with both so bear with me if any question is to simple!! I want to make a panel in Dashboard so I can control a Scene with a remote computer! The Scene is for an Election Candidates. I need to make a dropdown list of names and whenever I change the name in the dropdown the candidate party and file path for images changes accordingly and display it in Dashboard in a text field (the file path I really don't need i to display in Dashboard) but the party initials I need it because that initials is what triggers a visual logic action in Xpression(change color of objects) . I already have the datalinq connection part cover and it is connected!! Also I have the Dropdown list names entered in Dashboard. What I am struggling is in the part of changing the party names and file path of images so the Xpression can read it!!

    for example have a Dropdown list of say Donald Trump and Hillary Clinton and when I select a name in the dropdown list in Dashboard the party initials and file path for images change accordingly so I can datalinq it in Xpression!!

    Any Help will be appreciated!! I only have a week with both softwares!!! But Willing to Learn fast!!

    thanks

    afc


  • 2.  RE: Help with Dashboard Panel to Xpression

    Posted 09-15-2016 21:07

    Hi afc.
    There are quite a few ways to get here but the most straight-forward way assumes you've got 3 sets of lists:
    1. A list of your candidates
    2. A list of the parties for each candidate
    3. A list of the image paths for each candidates

    Yes, this would mean that if you have 3 candidates for the GOP, you would have 3 GOP entries in the party list...

    The trick is to attach a change handler to the candidate list to set the selected index of the party and image path lists to the same.

    Here is a simple panel (you can copy and paste it into a new custom panel) that demonstrates the technique:

    I have used Visual Logic in DashBoard to attach the task to the candidate parameter.

    <abs contexttype="opengear" dblinqport="2222">
    <meta>
    <params>
    <param access="1" constrainttype="INT_CHOICE" name="Candidate" oid="candidate" precision="0" stateless="true" type="INT16" value="-1" widget="combo">
    <constraint key="-1">Select One</constraint>
    <constraint key="0">Donald</constraint>
    <constraint key="1">Hillary</constraint>
    </param>
    <param access="1" constrainttype="INT_CHOICE" name="Party" oid="party" precision="0" stateless="true" type="INT16" value="-1" widget="combo">
    <constraint key="-1"/>
    <constraint key="0">Republican</constraint>
    <constraint key="1">Democrat</constraint>
    </param>
    <param access="1" constrainttype="INT_CHOICE" name="Image Path" oid="image" precision="0" stateless="true" type="INT16" value="-1" widget="combo">
    <constraint key="-1"/>
    <constraint key="0">c:\images\don-1.png</constraint>
    <constraint key="1">c:\images\hil-1.png</constraint>
    </param>
    </params>
    </meta>
    <param expand="true" height="423" left="40" oid="candidate" runtasksonload="true" top="21" widget="list" width="222">
    <task tasktype="ogscript">/*! block id=1000,1002 !*/
    params.setValue('image', 0, params.getValue('candidate', 0));
    /*! block id=1001,1003 !*/
    params.setValue('party', 0, params.getValue('candidate', 0));
    /*!!
    &lt;block id="1000" type="param_Image Path (image)[0]" x="327" y="108" w="243" SET="ID:1002" /&gt;
    &lt;block id="1002" type="param_Candidate (candidate)[0]" x="88" y="114" w="243" SET="" /&gt;
    &lt;block id="1001" type="param_Party (party)[0]" x="406" y="254" w="243" SET="ID:1003" /&gt;
    &lt;block id="1003" type="param_Candidate (candidate)[0]" x="166" y="294" w="243" SET="" /&gt;
    !!*/
    /*!!&lt;checksum&gt;d367f219e2d275679fb19277549f6adc&lt;/checksum&gt;!!*/</task>
    </param>
    <simplegrid cols="1" height="134" left="274" top="22" vspace="5" width="325">
    <param expand="true" oid="party" style="bg#dark;bdr:etched;size:Big;fg#panelfg;" widget="label"/>
    <param expand="true" oid="image" style="bg#dark;bdr:etched;size:Big;fg#panelfg;" widget="100"/>
    </simplegrid>
    </abs>


    #DashBoard


  • 3.  RE: Help with Dashboard Panel to Xpression

    Posted 09-15-2016 22:17
    Thanks James!!! this was very helpfull!! I knew it was a simple solution using Visual Logic!! I am new to Dashboard This way I can display as many Items I like selecting the candidate in a dropdown list but every value has to match!!!

    Thanks!!

    ariel


    Hi afc.
    There are quite a few ways to get here but the most straight-forward way assumes you've got 3 sets of lists:
    1. A list of your candidates
    2. A list of the parties for each candidate
    3. A list of the image paths for each candidates

    Yes, this would mean that if you have 3 candidates for the GOP, you would have 3 GOP entries in the party list...

    The trick is to attach a change handler to the candidate list to set the selected index of the party and image path lists to the same.

    Here is a simple panel (you can copy and paste it into a new custom panel) that demonstrates the technique:
    I have used Visual Logic in DashBoard to attach the task to the candidate parameter.


    #DashBoard