Showing results 1 to 2 of 2

Thread: Comparison of two string variables to activate color

  1. #1
    Join Date
    11.01.2019
    Posts
    2

    Default Comparison of two string variables to activate color

    Hello everybody,

    In ZenOn I would like to read two string variables and, according to the combination of the values, change the color of the stat text of the first variable in a screen. Is this possible?

    I.e. Var1 - Var2 ---> Color of Var1
    'Car' - 'open' ----> red
    'Car' - 'closed' ----> green
    'House' - 'open' ---> orange
    'House' - 'closed' ---> blue

    Any help is appreciated, thank you in advance.

  2. #2

    Default Re: Comparison of two string variables to activate color

    Hi  TMeck9,

    It's possible, but it's not straight forward.

    - Create an internal boolean variable with the appropriate limit colors (red/green, orange/blue) for value 0 and value 1
    - Create a string reaction matrix, create two conditions. On the condition (string value) "open", set the value of the boolean variable to "0", on the condition "closed" set the boolean variable to "1"
    - Link the string reaction matrix at the var 2 string variable

    You can now use the boolean variable at the element in your screen to change the color of the text dynamically



    Best regards,
    Mark

Similar Threads

  1. Replies: 0
    Last Post: 28th March 2018, 09:59
  2. Activate Frame
    By dario in forum VBA
    Replies: 4
    Last Post: 26th April 2013, 09:29
  3. String length field for STRING variables.
    By stolyarov_as in forum zenon Supervisor
    Replies: 3
    Last Post: 11th January 2013, 07:49
  4. Replies: 1
    Last Post: 13th March 2012, 12:13
  5. Standard Recipe and string variables
    By flajoso in forum zenon Supervisor
    Replies: 2
    Last Post: 5th May 2008, 09:43

Tags for this Thread

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •