If statement to compare text

Forums Desktop Info If statement to compare text

Tagged: ,

Viewing 2 reply threads
  • Author
    Posts
    • #4630
      Arvis
      Participant

      My goal is to display a message if the computer is in a specific domain, but I can’t get it to compare any text properly. Why doesn’t this work? The text doesn’t match, so the line shouldn’t display, but it always does.

      IF=value1:test, value2:othertext, comp:eq
      TEXT=color:#FFFB00,font-size:115%,display: testing

      I’ve tried putting the text in quotes, using variables, different comparators, etc. It always displays the second line.

    • #4632
      Arvis
      Participant

      I figured it out. The documentation says to put “comp”, but changing it to “comparator” fixed it.

      DOMAIN=interval:0,color:ffffff,set:dmn
      IF=value1:%dmn%, value2:mydomain.com, comparator:contains
      CONTROL=type:1,color:#FF6347,font-size:125%,display:AD Migration Required,uri:https://www.urltobookappointment.com

    • #4634
      Glenn
      Keymaster

      I notice the code does not trim the IF options so it’s possible there was a trailing space on the comparator value thus rendering it unrecognisable.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.
Glenn's Page