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.
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.
Author
Replies
Viewing 3 reply threads
The forum ‘Cloverleaf’ is closed to new topics and replies.