Graphics

 View Only
  • 1.  Visual logic to change visibility and move Y position based on a string value

    Posted 01-27-2017 01:40
    I'm trying to use visual logic to change the visibility of two text groups (which I can do) and then change another text group's Y postion based on a string value (which I can't do). I'm using the string compare function to compare the string to a value that I set. If i select the Less output option, the group visibility does change, but that doesn't affect the Y postion.

    Any help with this?


  • 2.  RE: Visual logic to change visibility and move Y position based on a string value

    Posted 01-27-2017 15:54
    If you can post a picture of your visual logic you are trying and we might be able to tell you what you've got wrong.
    #XPression


  • 3.  RE: Visual logic to change visibility and move Y position based on a string value

    Posted 01-27-2017 20:01

    Draft Year is either a year or text string (Undrafted). String Value is Undrafted. If the player is undrafted, I want to hide the Draft Team Group and Draft Position Group and move the Junior Team Group up to a Y postion of -234.


    #XPression


  • 4.  RE: Visual logic to change visibility and move Y position based on a string value

    Posted 01-28-2017 00:41
    I'm not sure I understand what you are trying to compare in the string compare... Are you trying to check if the draft year is less than a specific year in the String Value block?
    If so, then "string compare" is not the block you want to use, because String Compare does a textual comparison like sorting strings (e.g. 100 would be considered less than 20); it won't do a numerical comparison between two years. For a numerical comparison you would want to use the "smaller than" block.. If you can provide a more detailed description of what you are trying to do (compare) I can make the visual logic and send you a screenshot.
    #XPression


  • 5.  RE: Visual logic to change visibility and move Y position based on a string value

    Posted 01-28-2017 00:43
    Also, the "less" output will output a "1" when the string compare determines one string is alphabetically less than the other (not numerically less). So the value "1" gets fed to the "add" block and added to -234 which means the Y position will be set to -233.0. I'm not sure this is what you intended, is it? If you are trying to offset the Y position by -234 from it's original position, then this is not correct. I'll give you a sample once I understand better what you are trying to do.
    #XPression


  • 6.  RE: Visual logic to change visibility and move Y position based on a string value

    Posted 01-28-2017 02:40

    Here you go. This should be what you need (based on my understanding).

    Explanation:
    1: convert Draft Year to uppercase text.
    2: Search for UNDRAFTED in the uppercased Draft Year field (this allows it to work with whatever case the operator puts into the text field)
    - Outputs 0 if string is not found
    - Outputs a number greater than 1 if substring is found in input string
    3: Use greater than block to compare number if its greater than > 0.
    - Outputs 0 if input is 0
    - Outputs 1 if input is greater than 0
    4: Feed the 1 or 0 into the Input Selector block to pass either -300 or -234 into the Y position block.
    5. Invert the 1 or 0 and feed it into the draft team visibilites.


    #XPression


  • 7.  RE: Visual logic to change visibility and move Y position based on a string value

    Posted 01-30-2017 18:38
    Thank you. I had to reverse the two values, but got everything working.
    #XPression