Facility Control

 View Only
  • 1.  Name straps Via XML

    Posted 06-23-2017 12:58

    Hi Guys

    I want to use one Xpression template for ll my name straps

    I want to link my drop down menu to my XML source so that when I select a player number, It automatically matches to the name in the XML Document.

    I have attached a few screenshots as well as my XML.

    Cheers



  • 2.  RE: Name straps Via XML

    Posted 06-26-2017 18:42
    Just to clarify what you're trying to do: You have 2 drop-down lists (one based on the ID# and one based on the name) and want to keep their selections in sync with each other - correct?

    Is there a reason why you want them to be separate drop-downs?
    #DashBoard


  • 3.  RE: Name straps Via XML

    Posted 06-27-2017 06:16
    Hi James

    That is correct. I datalinq the first dropdown to the player number tab field in Xpression and the same goes for the second tab field which I use to Linq the names.
    #DashBoard


  • 4.  RE: Name straps Via XML

    Posted 06-27-2017 15:43
    Hi James

    That is correct. I datalinq the first dropdown to the player number tab field in Xpression and the same goes for the second tab field which I use to Linq the names.
    #DashBoard


  • 5.  RE: Name straps Via XML

    Posted 06-27-2017 18:20

    Give this code a look. Note that it does a check to see if the parameter values are different before trying to set them (to prevent any kind of looping)

    <abs contexttype="opengear" style="">
       <meta>
          <params>
             <param access="1" constrainttype="INT_CHOICE" name="Numbers" oid="Numbers" precision="0" type="INT32" value="0" widget="combo">
                <constraint key="0">0</constraint>
                <constraint key="1">1</constraint>
                <constraint key="2">2</constraint>
                <constraint key="3">3</constraint>
             </param>
             <param access="1" constrainttype="INT_CHOICE" name="Names" oid="Names" precision="0" type="INT32" value="0" widget="combo">
                <constraint key="0">Name Zero</constraint>
                <constraint key="1">Name One</constraint>
                <constraint key="2">Name Two</constraint>
                <constraint key="3">Name Three</constraint>
             </param>
          </params>
       </meta>
       <param expand="true" height="44" left="20" oid="Numbers" runtasksonload="true" top="18" width="119">
          <task tasktype="ogscript">
    
    
    /*! block id=1010,1011,1012,1008,1009 !*/
    if (params.getValue('Names', 0)  !=  params.getValue('Numbers', 0))
    {
        params.setValue('Names', 0, params.getValue('Numbers', 0));
    } else {
        
    }
    /*!!
     &lt;block id="1010" type="if" x="283" y="10" w="268" INPUT1="ID:1011" OPERATION="does not equal" INPUT2="ID:1012" TRUE="ID:1008" FALSE="" IGNORE="" /&gt;
    &lt;block id="1011" type="param_aNames (Names)[0]" x="10" y="10" w="243" SET="" /&gt;
    &lt;block id="1012" type="param_aNumbers (Numbers)[0]" x="10" y="72" w="243" SET="" /&gt;
    &lt;block id="1008" type="param_aNames (Names)[0]" x="854" y="60" w="243" SET="ID:1009" /&gt;
    &lt;block id="1009" type="param_aNumbers (Numbers)[0]" x="581" y="60" w="243" SET="" /&gt;
    !!*/
    /*!!&lt;checksum&gt;f55449228b3ea81e58e48a85b76b0021&lt;/checksum&gt;!!*/</task>
       </param>
       <param expand="true" height="47" left="157" oid="Names" top="18" width="226">
          <task tasktype="ogscript">
    
    
    /*! block id=1010,1011,1012,1009,1008 !*/
    if (params.getValue('Names', 0)  !=  params.getValue('Numbers', 0))
    {
        params.setValue('Numbers', 0, params.getValue('Names', 0));
    } else {
        
    }
    /*!!
     &lt;block id="1010" type="if" x="283" y="10" w="268" INPUT1="ID:1011" OPERATION="does not equal" INPUT2="ID:1012" TRUE="ID:1009" FALSE="" IGNORE="" /&gt;
    &lt;block id="1011" type="param_aNames (Names)[0]" x="10" y="10" w="243" SET="" /&gt;
    &lt;block id="1012" type="param_aNumbers (Numbers)[0]" x="10" y="72" w="243" SET="" /&gt;
    &lt;block id="1009" type="param_aNumbers (Numbers)[0]" x="854" y="60" w="243" SET="ID:1008" /&gt;
    &lt;block id="1008" type="param_aNames (Names)[0]" x="581" y="60" w="243" SET="" /&gt;
    !!*/
    /*!!&lt;checksum&gt;140e71d6966e948cf343eecba764fdfe&lt;/checksum&gt;!!*/</task>
       </param>
    </abs>
    

    #DashBoard


  • 6.  RE: Name straps Via XML

    Posted 07-04-2017 09:07
    Hi James

    This seems to be working well.

    thanks again
    #DashBoard


  • 7.  RE: Name straps Via XML

    Posted 07-11-2017 08:55

    Hi James

    In the above example you gave me, it links to parameters, is it possible to link more than 2? I have tried but it does not seem to work. I have attached an example of the 4 that id like to link.

    any advice would be great.


    #DashBoard