Graphics

 View Only
  • 1.  Use Text Object instead of datalinq key with datalinq

    Posted 09-26-2018 19:46
    I would like to use the value in text object to filter my results of datalinq item instead of using a datalinq key. Is this possible and if so how.

    Contests\Contest\Choices\Choice<1>\Votes\VotePercent


  • 2.  RE: Use Text Object instead of datalinq key with datalinq

    Posted 09-27-2018 17:54
    I think I get what you're trying to do. I've found the easiest way for me is to have that text object be datalinq'd to where you want to go, and then set a script OnSetText to update a datalinq key and refresh it.

    Here's what a sample of that code would look like:

    dim keys as xpDatalinqKeys
    dim key as xpDatalinqKey
    Scene.GetDatalinqKeys(keys)
    keys.GetKeyByName("YourKeyToUpdate", key)
    key.AsString = Text // Since this is the OnSetText script event, Text here is what the text of the object would be updated to.
    Scene.RefreshDatalinqs()

    #XPression


  • 3.  RE: Use Text Object instead of datalinq key with datalinq

    Posted 09-27-2018 18:15
    Hi Foxtrot, That should scene.RefreshDatalinqs() plural..
    #XPression


  • 4.  RE: Use Text Object instead of datalinq key with datalinq

    Posted 10-09-2018 17:45
    So for the life of me I cannot get this to work. I have no problem accessing the text field and getting that value but when I try to update the datalinq key it doesn't take. only what is typed into the datalinq key value field seems to apply either when editing the scene or after it has been added to the sequencer under the template data. setting in a script doesn't seem to work. Perhaps that key needs to be added in the script and not already defined in the scene objects datalinq keys tab.
    #XPression


  • 5.  RE: Use Text Object instead of datalinq key with datalinq

    Posted 10-09-2018 18:07
    Okay so of course right after I post the above I stumbled into the following solution that works correctly. Based on the above script I put the following in the Scene OnPrepare event

    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


    Please note that Self.RefreshDatalinqs() did not work for me I had to change it to Self.RefreshDatalinqs
    #XPression


  • 6.  RE: Use Text Object instead of datalinq key with datalinq

    Posted 06-19-2020 01:55

    <x-zendesk-user data-user-name="Brian Ford">372361507432</x-zendesk-user>  what is "Scene.RefreshDatalinqs()" means in this Script thanks


    #XPression