Find exact text and not contains

Hello guys,

We're dealing it some issue on attempting this:

Right now with find() function or exact() you can't achieve the following:

Let's say we have an e-mail with this phrase "I am an idealist", and on the other hand we have a key defined as: "ideal", right now because the body considers all the text, if you try with find(), the output is true because it finds "ideal" on "am an [ideal]ist", and the exact() will not work as well because "am an idealist" is not the same as "ideal", even if the key was "idealist" it will output false as well.

Any ideas?

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to TiagoMSimoes

    I'd start with

    whereContains(local!criterios, local!corpo)

    ...which will return an array of matches (indices in the 2nd array where value(s) from the 1st array are a match).  If no matches, the returned array will be empty.  You can do what you want from there with these results.

    The same result is attainable via a nested a!forEach (as long as you structure it right, i think your examples above are close but both miss the mark somewhat) - but whereContains() does this work for you.

Children
No Data