"Greater than or is", "less than or is", and "between" compare operators for strings

B_10
Tera Contributor

In a condition-type field, or in like a filter for a list, if I select a field that is a string-type field, there are three compare operators in the list of available operators that I do not understand the function of when it comes to strings.  I was hoping someone could help me understand these three compare operators:

  1. Less than or is
  2. Greater than or is
  3. Between
  4. Also, what does "Matches Pattern" refer to?  I at least understand the other three in other contexts, but what does "Matches Pattern" refer to, something about Regex, which I am familiar with?

Here is a screenshot so that you can see exactly what I am talking about, just to make sure I am being clear with what I am asking.  Thank you in advance.

find_real_file.png

1 ACCEPTED SOLUTION

Jeff Currier
ServiceNow Employee
ServiceNow Employee

Here are my examples

1) less than or is:  ABC is less than or is would be true for ABC and ABD but not ABB

2) Greater than or is:  ABC is greater than or is would be true for ABB and ABC but not ABD

3) Between: ABC is between ABB and ABD.  ABD is not between ABB and ABD

4) Matches pattern

Pattern matching in Field Normalization uses special characters differently from regular expressions to create patterns that the platform recognizes when transforming field values.

Pattern matching can be used only in condition statements. When using pattern matching characters in a condition statement, make sure to select the matches pattern operator.

Use the following special characters to create patterns for searches.
  • The asterisk in a search string (*) matches any number (including zero) of any character.
  • The question mark (?) in a search string matches one of any character.
  • Everything else in a search string matches itself.

Examples

  • the story matches the story but not that story.
  • *story matches the story and that story, but not that story is the best.
  • st?ry matches story and stxry, but not my story or stairy.
  • *b?gus* matches bogusmy bogus story, and His bagus machine, but not my bgus story or my baigus story.

View solution in original post

2 REPLIES 2

Jeff Currier
ServiceNow Employee
ServiceNow Employee

Here are my examples

1) less than or is:  ABC is less than or is would be true for ABC and ABD but not ABB

2) Greater than or is:  ABC is greater than or is would be true for ABB and ABC but not ABD

3) Between: ABC is between ABB and ABD.  ABD is not between ABB and ABD

4) Matches pattern

Pattern matching in Field Normalization uses special characters differently from regular expressions to create patterns that the platform recognizes when transforming field values.

Pattern matching can be used only in condition statements. When using pattern matching characters in a condition statement, make sure to select the matches pattern operator.

Use the following special characters to create patterns for searches.
  • The asterisk in a search string (*) matches any number (including zero) of any character.
  • The question mark (?) in a search string matches one of any character.
  • Everything else in a search string matches itself.

Examples

  • the story matches the story but not that story.
  • *story matches the story and that story, but not that story is the best.
  • st?ry matches story and stxry, but not my story or stairy.
  • *b?gus* matches bogusmy bogus story, and His bagus machine, but not my bgus story or my baigus story.

Nailed it, thanks man, I appreciate you taking the time to write this out, and for knowing your stuff.  Have a nice day