Xlate [ct]

  • Creator
    Topic
  • #52564
    Femina Jaffer
    Participant

    Does anyone know what the correct syntax is to use the [ct] string operation with the IF in an xlate?

    Thank you.

    Femina

Viewing 3 reply threads
  • Author
    Replies
    • #74683
      Jim Kosloskey
      Participant

      Femina,

      What I do is to place the text for which I am searching in a temp variable.

      Let’s say I want to see if the text ‘ text ‘ ( note there is a space at the begging and end) is contained in an input field.

      I set a temp variable

      COPY = text –> @contains   (note again space at beginning and end)

      Then

      IF field ct @contains

         Whatever Actions you want…

      Note I only use the example with spaces to show that there can be spaces in the contains value – also note field above in the IF would be replaced by the address path to whatevere field you want to test.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #74684
      Jim Lohe
      Participant

      Jim K, one question,

      if I set a temp variable

      COPY = M F O

    • #74685
      Jim Kosloskey
      Participant

      Jim,

      I just tested this Cloverleaf 5.6 and it worked fine for me.

      I set @contains to your value, did the IF (with else) referenced an inbound HL/7 field that is null and the False path was appropriately taken.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #74686
      Jim Lohe
      Participant

      Jim Kosloskey wrote:

      Jim,

      I just tested this Cloverleaf 5.6 and it worked fine for me.

      I set @contains to your value, did the IF (with else) referenced an inbound HL/7 field that is null and the False path was appropriately taken.

      After a phone call to Jim (thanks Jim!) I came to understand that “ct” operator does not work like a “list search”, but rather like a “string match”.    I completely misunderstood the point of the command, and my initial tests matched my expected outcomes, only confirming my misinterpretations.    Oh well, better to learn now then after I move something to production.    

      Thanks again Jim.

Viewing 3 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10