Graphics

 View Only
  • 1.  %relid% or datalinq key update for crawl scene group secondary scenes

    Posted 20 days ago

    Howdy-

    I've created an election results crawl using a scene group. The first scene is static text (race, precincts), datalinq-ed to an excel file. the second scene is a crawl, datalinq-ed to another column in the same excel file row. the 3 text fields are using the same datalinq key (line). when i add this group to a sequence, I can update the static text datalinq key using %relid% but I can't seem to update the crawl text datalinq.

    Any ideas on how I access or update the datalinq key or even the datalinq field for the child/non-primary scenes in a scene group?



    ------------------------------
    Tom Loftus
    Operations Supervisor
    SFGovTV City and County of San Francisco
    San Francisco United States
    ------------------------------


  • 2.  RE: %relid% or datalinq key update for crawl scene group secondary scenes

    Posted 19 days ago

    The only way to set the datalinq key of your child scene to match that of the static parent in a Scene Group is with scripting. 

    Not sure how familiar you are with scripting, but here one you can place on each of your child scenes. It gets the value of the "line" datalinq key in the parent scene, and sets the same datalinq key in the child scene to match. The name of the datalinq key is case sensitive, so make sure the datalinq key in both your parent and child scenes is all lower case like you wrote it above. 

    This script goes on the OnOnline event of each of the child scenes in your crawl. Let us know if this works for you.

    'declare variables
    dim keys,parentkeys as xpDatalinqKeys
    dim key,parentkey as xpDatalinqKey
    dim parent as xpScene
    
    'get 'line' datalinq key from parent scene
    self.GetParent(parent)
    parent.GetDatalinqKeys(parentkeys)
    parentkeys.GetKeyByName("line",parentkey)
    
    'get 'line' datalinq key from child scene
    self.GetDatalinqKeys(keys)
    keys.GetKeyByName("line",key)
    
    'set child scene's 'line' datalinq key value to match the parent scene's
    key.AsString = parentkey.AsString
    



    ------------------------------
    Jeff Mayer
    Ross Video
    ------------------------------



  • 3.  RE: %relid% or datalinq key update for crawl scene group secondary scenes

    Posted 19 days ago

    Thanks Jeff, that works!

    By any chance, is there a way to get the %relid% value to pass to the child? If I manually enter the value for the line Datalinq key, it all works great. However, if I use %relid% as the parent scene key, the child scene does not seem to pick up the value from the parent.

    If not, no worries. I can manually enter the key for each page.

    Thanks again for the information and code!



    ------------------------------
    Tom Loftus
    Operations Supervisor
    SFGovTV City and County of San Francisco
    San Francisco United States
    ------------------------------



  • 4.  RE: %relid% or datalinq key update for crawl scene group secondary scenes

    Posted 19 days ago

    That makes sense, as the child scene doesn't have a take item ID associated with it, so its %relid% value can't be calculated. 

    Try this instead...when using %relid% in the Datalinq Key, the child scene will calculate the equivalent value by getting the parent scene's Take ID and subtracting the parent scene's group's Take ID and setting it's Datalinq Key as the difference. If something other than %relid% is used in the Datalinq Key, the script will still pass that value to the child scene's Key.

    'declare variables
    dim keys,parentkeys as xpDatalinqKeys
    dim key,parentkey as xpDatalinqKey
    dim parent as xpScene
    dim takeitem as xpTakeItem
    dim group as xpTakeItemGroup
    
    'get parent scene's take id and group id
    self.GetParent(parent)
    parent.GetTakeItem(takeitem)
    takeitem.GetGroup(group)
    
    'get 'line' datalinq key from parent scene
    parent.GetDatalinqKeys(parentkeys)
    parentkeys.GetKeyByName("line",parentkey)
    
    'get 'line' datalinq key from child scene
    self.GetDatalinqKeys(keys)
    keys.GetKeyByName("line",key)
    
    'if datalinq key is set to %relid%
    'set child scene's 'line' datalinq key value to match the parent scene's equivalent relid
    if parentkey.AsString = "%relid%"
    key.AsString = cstr(takeitem.ID - group.ID)
    
    'if not using %relid%
    'set child scene's 'line' datalinq key value to match the parent scene's
    else key.AsString = parentkey.AsString
    
    end if


    ------------------------------
    Jeff Mayer
    Ross Video
    ------------------------------



  • 5.  RE: %relid% or datalinq key update for crawl scene group secondary scenes

    Posted 11 days ago

    Thanks for all your help Jeff, this worked great for Tuesday and will make life much easier in November when the ballot will most likely be much longer.

    Have a great day!



    ------------------------------
    Tom Loftus
    Operations Supervisor
    SFGovTV City and County of San Francisco
    San Francisco United States
    ------------------------------