Graphics

 View Only
  • 1.  Datalinq script to filter stats by minimum games played?

    Posted 12-13-2021 11:01
    I'm making league leader boards and I want to filter data by minimum games played and by position.
    I'm using Datalinq with data from NHL HITS via OASIS.
    SQL scripting doesn't seem to work in this format.
    Ideas?

    Thanks so much! Sonja

    ------------------------------
    Sonja Broomfield
    ------------------------------


  • 2.  RE: Datalinq script to filter stats by minimum games played?

    Posted 12-13-2021 15:26
      |   view attached
    I whipped up a scene to make sure It works, here is my result. This video is an excellent resource for accomplishing this very thing. 

    https://www.youtube.com/watch?v=RamDBQHU3tU

    Let me know if you have any questions or if this is indeed a solution to your problem.

    ------------------------------
    Riley Gibbs
    ------------------------------



  • 3.  RE: Datalinq script to filter stats by minimum games played?

    Posted 12-13-2021 22:49
    Thank you Riley, this is great stuff I will certainly use, but unfortunately not the answer to my problem.
    To use your example, I am trying to make a leaderboard of most popular Hollywood cops out of a data set of votes for most popular characters of which certain ones are identified as cops.  Trying to make a subset of leaders, in other words.
    S.

    ------------------------------
    Sonja Broomfield
    On-Air graphics (Duet & Xpression)
    Freelance
    Canada
    ------------------------------



  • 4.  RE: Datalinq script to filter stats by minimum games played?

    Ross Staff
    Posted 30 days ago
    Hi Sonja,
    It looks like your data source is XML, so those SQL queries aren't going to work. 

    For filtering an XML source, make sure you're running at least XPression version 8.0 or above, so you have these features. 
    • [implemented] the XML/JSON datalinqs can now search multiple attributes or elements to return a node that matches all search criteria.  e.g. players<team=NY;jersey=10>
    • [implemented] the XML datalinq types can search for children elements/attributes in a level of the tree by using "childname.field=%key%".  e.g. player<info.jersey=%num%>\name

    I've not used XML filtering myself. But here are some examples of XML filters that work. I hope this is enough to get you started.  

     

    team<player.uni=%jersey%>\player\rcv is trying to return the team based on the jersey number entered ("Return the team that has a player with jersey number X"). However, \player\ is always going to return the first listed player on either team. The query is "working", it just happens that player<1> for either team is defensive, so they don't have any receiving numbers that would be nested within \rcv.  

     

    team<vh=%team%;player.uni=%jersey%>\player\rcv is doing the same thing; you're just additionally filtering by away/home ("Return the team that has a player with jersey number X, and has the vh designation of V/H").  In both cases the query is trying to return the first player listed on the team.




  • 5.  RE: Datalinq script to filter stats by minimum games played?

    Posted 30 days ago
    Thank you Garner, this is what I was looking for! Especially the childname.field property.
    Just one more question, is there a way to query for 'not equal', 'greater than' or 'less than' instead of just 'equals'?
    The >< signs can't be used.

    ------------------------------
    Sonja Broomfield
    On-Air graphics (Duet & Xpression)
    Freelance
    Canada
    ------------------------------



  • 6.  RE: Datalinq script to filter stats by minimum games played?

    Posted 28 days ago
    Hi Sonja,

    Please use "!=" for an inequality (in general "!" basically means "not").

    ------------------------------
    Gerard de Vries
    Solution Architect Live Graphics & Virtual Graphics
    EMG
    The Netherlands
    ------------------------------



  • 7.  RE: Datalinq script to filter stats by minimum games played?

    Posted 27 days ago
    Thank you Gerard.  I am trying to filter stats for players who have played a minimum of 10 games.  Do I use 'not equal (!=)' nine times (for 1-9 games played)?  Or is there an easier way to ask for 10 or more games played?

    ------------------------------
    Sonja Broomfield
    On-Air graphics (Duet & Xpression)
    Freelance
    Canada
    ------------------------------



  • 8.  RE: Datalinq script to filter stats by minimum games played?

    Posted 27 days ago

    Hi Sonja,

    It is not necessary to use nine times "!=". You should be able to filter using something like "players<team=NY;matches>9".

    I have never used a Datalinq filter myself, but looking at Garner's response the above (in bold and underlined) should work.



    ------------------------------
    Gerard de Vries
    Solution Architect Live Graphics & Virtual Graphics
    EMG
    The Netherlands
    ------------------------------