Graphics

 View Only
  • 1.  Datalinq from Scorebot--Scorehub

    Posted 02-07-2022 11:27
    Hi there,

    I am attempting to pull data from a Scorebot Volleyball & Basketball (See Volleyball picture below) from the HPlayer 1, 2, 3, etc and the VPlayer 1, 2, 3 (Not Shown) these get the player number of the players that are on the court.  What I am trying to do is pull their Player Name, Year of Eligibility, Hometown, & Jersey number from a separate excel sheet, which is working fine.  The problem I am having is because they use the HPlayer 1, 2, 3 for any player that is on the floor how do I get the datalinq to translate HPlayer 1 and then find the correct Jersey Num to fill the Player Side bar that I am wanting to put on the screen with "No Official Game Data".  

    My guess and by no means am I XPression/Datalinq expert is that I have to have hidden fields on the slide to pull the Data from Scorebot then have some visual logic or code to look at the excel for the correct Jersey Number. and rest of the information.

    Any help would be greatly appreciated.  

    An example of the data I am receiving from Scorebot Volleyball.


    ------------------------------
    Brad W. Smith
    WESTMAN COMMUNICATIONS GROUP
    ------------------------------


  • 2.  RE: Datalinq from Scorebot--Scorehub

    Posted 02-10-2022 15:30
    I would think this is possible Brad.  Without having a copy of the data it is going to get tricky.  So I would say, first request, if you can get an offline copy of that data that you can send out as a file, that would be a help because then I can trial error on my own end and then try to come up with a solution.

    That being said.  I have done something inside of Xpression from a datalinq file.

    Column: Game\Event<type_id=16>\Q<qualifier_id=103>
    Row: value

    So that would return data only where that Event Type existed and then the qualifier existed.  It was a way of searching through data in a weird way without it being tabled.

    So in your case I would think you could do something with the data to grab the jersey number next to the arrows you have drawn.  That data will go back to Xpression into a text box.  That text box would then be used as a text macro and a datalinq key in order to sort through an excel sheet of data that you manually type out to display what you want to display.  So not visual logic, it is all a script.  And you will need the script for getting a datalinq key by name and resetting that data.

    ------------------------------
    Garrett Hall
    Overtime Elite
    ------------------------------



  • 3.  RE: Datalinq from Scorebot--Scorehub

    Posted 02-11-2022 13:24
    Garrett,

    Thanks for your reply.  I am sorry for the lack of pictures the other day I wasn't at the XPression.  Here are some pictures to help makes sense of my question.


    This is what it's supposed to look like.
    Player Side Bar
    Here is the excel data.

    Excel Data Example

    Here is the Visual Logic for the Year and Position.

    Visual Logic Position




    Visual Logic coding for the Year.

    So those are the screen shots from the coding so far.  I am thinking I need to hide the fields on the Layout Template and then somehow reference back to the TeamBu Table to confirm the JerNum and then populate it accordingly.

    I hope that makes more sense.  I look forward to your thoughts.



    ------------------------------
    Brad W. Smith
    WESTMAN COMMUNICATIONS GROUP
    ------------------------------



  • 4.  RE: Datalinq from Scorebot--Scorehub

    Posted 02-11-2022 14:10
    Some of these things might be tough to tackle through.  But here comes some ramble.

    The visual logic for the 1st year-6th year, that can be a simple script as well.  
    dim TEXT as xpTextObject
    
    scene.getObjectbyName ("Name of the Text Field", TEXT)
    
    if text = "1" then
    Text.text = "1st Year"
    
    else if text = "2" then
    Text.Text = "2nd Year"
    
    ......
    ​

    etc etc.  Sorry if there is a typo in that on the scene parts as I am not typing this from Xpression.

    There is also this that you will need that is taken from another post in the forums

    dim keys as xpDatalinqKeys
    dim key as xpDatalinqKey
    dim source as xpTextObject
    
    Self.GetObjectByName("Selected Contest ID", source)
    Self.GetDatalinqKeys(keys)
    keys.GetKeyByName("selectedContestID", key)
    key.AsString = source.Text
    Self.RefreshDatalinqs

    That script will allow you to have the datalinq hit a text box.  Then you have that text box send the data to a datalinq key, and you can put that datalinq key into your data from your excel sheet and that will set your jersey number.

    So then if the data in the excel sheet is tabled.  You can do an SQL Query of that data (see Xpression U videos).  Then use the jersey number inside of that.  It should only return one line of data since there should only be one person with that jersey number (sorry American football people, not you).  Then now you have that line in excel and use that data anywhere.  Name, number, position, year, height, weight, headshot, animating headshot, team logo, etc etc etc.  If you can put it in an excel sheet then you can get to it in Xpression.

    The if then statement from above for 1st year, can also be used for your Guard/Forward visual logic as well.


    Ramble done for now, I know that it is going to be a little bit of a wild goose chase for a bit.  If it helps, I could remote in with you if your system has internet and help look at your data and help get you started.  Then once one is done, it is rinse repeat how ever many different scenes you have to do.



    ------------------------------
    Garrett Hall
    Overtime Elite
    ------------------------------



  • 5.  RE: Datalinq from Scorebot--Scorehub

    Posted 02-11-2022 14:40
    Garrett

    Thanks for the information.  I will try some this weekend and see if I gain success.

    Have a great weekend and I will reply Monday with my answers.

    Brad





  • 6.  RE: Datalinq from Scorebot--Scorehub

    Posted 02-16-2022 15:50
    Hello Garrett

    I am back at our XPression and attempting you solution.  Would you have time this week during the earlier part of the day/afternoon to take a look with me.  If so please message me and I will send you my contact information.

    Thanks

    ------------------------------
    Brad W. Smith
    WESTMAN COMMUNICATIONS GROUP
    ------------------------------



  • 7.  RE: Datalinq from Scorebot--Scorehub

    Posted 02-16-2022 17:18
    I just wanted to add some notes to this point.  Brad and I  were able to spend about an hour on a zoom call and work through some things.  Something of note is that Scorebot outputs digits with extra spaces sometimes.  So we had to use the following script on the text box.

    text = trim(text)​

    By using that script it covers us for single or double digit athletes.  And it removed the leading zeros that were before the number.  We also used the below script to take the text box that had the jersey number and copy that data over to a datalinq key. - I will not take credit for this script, it is an easy forum search away to get the original poster of this script.

    dim keys as xpDatalinqKeys
    dim key as xpDatalinqKey
    dim source as xpTextObject
    
    Self.GetObjectByName("Selected Contest ID", source)
    Self.GetDatalinqKeys(keys)
    keys.GetKeyByName("selectedContestID", key)
    key.AsString = source.Text
    Self.RefreshDatalinqs

    Then Brad had all of his normal data tabled in an excel sheet.  Then we had some scripting on some text boxes to make 1 = "1st Year".  Some normal stuff, not too bad.



    ------------------------------
    Garrett Hall
    Overtime Elite
    ------------------------------



  • 8.  RE: Datalinq from Scorebot--Scorehub

    Posted 02-17-2022 07:27

    Kudos to Garrett!  I am still learning coding and Garrett didn't hesitate to offer up an hour of his time to assist.

    Like Garrett said during the call this community is about helping everyone out and from what you learn Pay It Forward when the opportunity presents itself.  


    Thanks Garrett!!



    ------------------------------
    Brad W. Smith
    WESTMAN COMMUNICATIONS GROUP
    ------------------------------