Facility Control

 View Only
Expand all | Collapse all

Custom Sports panel for XPression

  • 1.  Custom Sports panel for XPression

    Posted 06-03-2014 19:52

    Newbie to DashBoard.

    I need to make a custom panel for XPression. This panel will be for Volleyball. I would like the panel to read the player "Roster" from an Excel .xslx (local) file for home and away teams. One .xslx file with two sheets.

    The .xslx file will pull the Player #, Name, and Position to fill an XPression TEAM template. I would like to add a field next to each player for # of Kills. The Kills would be manual input from operator.

    At the same time, I want to have Home/Away score with a +1 button and GAME #

    (They play best of 5)

    I did try to start this with the Video Tutorials, but I'm not getting anywhere.

    Any help?

    thanks



  • 2.  RE: Custom Sports panel for XPression

    Posted 06-03-2014 20:01
    My understanding is that dashboard can only read in an XML sheet at this point. I would really like to hear otherwise but I think we are both out of luck

    The increment itself is not too hard. Declare your parameter, this is what you will datalinq or publish to later, then add a button and click add a task. The task window will pop up and you can select the data modification tab on the bottom left. This lets you select your parameter to be modified and modify the parameter by what ever you want.

    #DashBoard


  • 3.  RE: Custom Sports panel for XPression

    Posted 06-03-2014 20:46
    I thought that XPression reads Excel files and so would DashBoard, but I can if needed export my Excel file into an .xml file:

    #DashBoard


  • 4.  RE: Custom Sports panel for XPression

    Posted 06-03-2014 21:21
    You are write on the Xpression reading Excel files but XML is the way to go with the dashboard. There should be some video tutorials about bringing in the xml on here some where.

    #DashBoard


  • 5.  RE: Custom Sports panel for XPression

    Posted 06-04-2014 15:08
    Hi,

    You can save Excel files in XML format (Save As -> Format... -> Excel 2004 XML Format).

    PanelBuilder 107 is a tutorial showing how to read & parse XML.

    If you're using Excel to capture simple data like team rosters, you should be able to easily make sense of the saved-as-xml version and use Excel to edit it, and DashBoard to import it.

    Let me know how it works out,

    John

    #DashBoard


  • 6.  RE: Custom Sports panel for XPression

    Posted 06-04-2014 16:10
    John,

    Thank you for the reply.

    Yes, I do know I can export the .xslx to .xml, my problem being to creating my panel is getting it to read (import) the data. I have looked at the dashboard video tutorials, but I still cant understand how to start, setup and build the panel with the data and make the extra input fields I want/need. I'm reading the user guide, but still not getting how to pull in the data and have it link to the XPression template.

    #DashBoard


  • 7.  RE: Custom Sports panel for XPression

    Posted 06-09-2014 21:04
    Anyone doing this for sports?

    #DashBoard


  • 8.  RE: Custom Sports panel for XPression

    Posted 06-10-2014 00:09
    Yep, that is my purpose for using dashboard/xpression.

    #DashBoard


  • 9.  RE: Custom Sports panel for XPression

    Posted 06-10-2014 14:31
    We have an example CustomPanel for Cricket that you can download from here:

    http://www.rossvideo.com/control-systems/dashboard/dashboard-u/example-apps.html

    Now...this is probably more extensive than the average person would require (we were trying to show every kind of thing you could do...).

    We have internally built scoring apps for Tennis, Hockey, Football and I know of at least one customer who has built a Soccer one.

    #DashBoard


  • 10.  RE: Custom Sports panel for XPression

    Posted 09-08-2022 02:14
    Is this Custom Panel for Cricket still available anywhere? Would love to take a look at it

    ------------------------------
    Sam McIntosh
    National Rugby League
    Australia
    ------------------------------



  • 11.  RE: Custom Sports panel for XPression

    Posted 11-16-2016 14:33
    How do you get the data stored as elements out of the xml? By running xpath and using getAttribute I can easily extract data stored as attribute in XMLs but I cant seem to extract the elements...
    Thanks.
    #DashBoard


  • 12.  RE: Custom Sports panel for XPression

    Posted 11-16-2016 20:01
    I assume you mean the text content of a node?

    Once you have the node (the same thing from which you would extract an attribute), you can call getTextContent() on it.

    For more information about what you're working with. XPath returns a NodeList filled with Node objects (generally of type "Element")

    NodeList documentation:
    https://docs.oracle.com/javase/7/docs/api/org/w3c/dom/NodeList.html

    Node/Element documentation:
    https://docs.oracle.com/javase/7/docs/api/org/w3c/dom/Node.html
    https://docs.oracle.com/javase/7/docs/api/org/w3c/dom/Element.html

    #DashBoard


  • 13.  RE: Custom Sports panel for XPression

    Posted 11-17-2016 13:00

    Yes James, I mean the text content of a node.

    I'm sure I have the nodes since I get the correct amount of nodes returned by getElementsByTagName. Still I keep getting the "getTextContent is not defined" message in the debugger.

    Here's some of the code:

    var XML = ogscript.parseXML('file');
    
    if (XML == null) {
    
         ogscript.debug('Failed to read file');
    
    } else {
    
       ogscript.debug('Parsing XML');
    
       var games = XML.getElementsByTagName('Played');
    
       ogscript.debug("items found by getElementsByTagName: " + games.length);
      
       params.setValue('found', 0, games.length);
    
       for (i = 0; i < games.length; i++) {
          var node = games.item(i);
          var gamesPlayed = getTextContent(node, 'Played');
          params.setValue('matchesArray', i, gamesPlayed);
       }
      
    };

    Shouldn't getTextContent now run on all of the elements returned by getElementsByTagName?

    Any help would be appreciated,

    T


    #DashBoard


  • 14.  RE: Custom Sports panel for XPression

    Posted 11-17-2016 14:26
    Glad you figured it out, Tobias.
    For anyone else who might be looking at this thread in the future, here is the line that required a change:

    var gamesPlayed = getTextContent(node, 'Played');
    should be
    var gamesPlayed = node.getTextContent();
    #DashBoard