Graphics

 View Only
  • 1.  Forced carriage return

    Posted 02-25-2016 07:45
    I need a way to force a carriage return in a two or three word name. With Visual Logic, I am feeding text from a one-line text field to another that is broken into two lines.

    I have Firstname Lastname from my election database

    but need:

    Firstname
    Lastname

    I've tried breaking the two-line version into two text fields, fed text of the one-line to the top field and applied combinations of left string, right string, trim, trim left, trim right, trunc and had no success.

    I also searched the forum and found two scripts that seemed to apply.

    dim textObject as xpTextObject Scene.GetObjectByName("FirstName", textObject) textObject.Text = Split(Text, " ", 2)(0) &

    `Text = Split(Text, " ", 2)(0)`

    but I couldn't get either to work.


  • 2.  RE: Forced carriage return

    Posted 02-25-2016 21:29
    Make sure "FirstName" and "LastName" are UNpublished.
    #XPression


  • 3.  RE: Forced carriage return

    Posted 02-25-2016 21:29
    Datalinq the database field to a single hidden text object and on that objects OnSetText script use something like this, to copy the first and last name to two other fields called "FirstName" and "LastName". I didn't actually try this, but it should work..


    dim textObject as xpTextObject

    Scene.GetObjectByName("FirstName", textObject)
    textObject.Text = Split(Text, " ", 2)(0)

    Scene.GetObjectByName("LastName", textObject)
    textObject.Text = Split(Text, " ", 2)(1)


    (edit: I tried it, and it does work :))
    #XPression


  • 4.  RE: Forced carriage return

    Posted 02-25-2016 23:54
    WooHOO. Thank you, Brian! Today, I'm working in the office in Designer 5.5 2722, I created a test scene with static text not Datalinq'd text and it works playing it out of the sequence. Will test on the Studio box in control room in an hour. Having the name fields published was probably caused my earlier failures. Do you see any reason it might not play well using your election sorting script, published to our project server and played out through the Remote Sequencer? This was the last piece of the puzzle, since I ran out of time to include the RaceName in the graphic and have a script point to theRaceName in the MSSQL database my IT built.
    #XPression