Difference between revisions of "Field Values in Expressions"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 17: Line 17:
::(The criteria is satisfied when the company name is either Acme or Ajax)
::(The criteria is satisfied when the company name is either Acme or Ajax)


:*To search for a field value that happens to contain a vertical pipe (|), you need to "escape" the pipe so it is recognized as a literal character in the field. To do that, ...
:*To search for a field value that happens to contain a vertical pipe (|), you need to "escape" the pipe so it is recognized as a literal character in the field. To do that, you put a backslash in front of it: \|.  
::* That works in REST APIs and in the GUI.  
::* In Java strings, the backslash is already an escape character. (It combines with the one that follows it to create a single character.)
::*So in Java code, you need two backslashes: \\|
:::(The "\\" combines to become a single "\", so the filter expression handler sees "\|".)


:*To include a single quote in the value you're searching for, specify four single quotes (<tt><nowiki>''''</nowiki></tt>).  
:*To include a single quote in the value you're searching for, specify four single quotes (<tt><nowiki>''''</nowiki></tt>).  

Revision as of 00:58, 18 October 2011

FIELD_VALUE

The search value - a string, a date, a number.
Follow these guidelines when specifying values:
  • The value can be partial text or whole words
  • Enclose strings and date/time values in 'single quotes'
  • To search for a blank (empty) string, use two single quotes, with nothing between them ('').
  • To search for a blank (empty) field of other kinds, use a field value of BLANK
  • To search for multiple field values, separate each value using vertical pipe (|)
For example: company_name='Acme|Ajax'
(The criteria is satisfied when the company name is either Acme or Ajax)
  • To search for a field value that happens to contain a vertical pipe (|), you need to "escape" the pipe so it is recognized as a literal character in the field. To do that, you put a backslash in front of it: \|.
  • That works in REST APIs and in the GUI.
  • In Java strings, the backslash is already an escape character. (It combines with the one that follows it to create a single character.)
  • So in Java code, you need two backslashes: \\|
(The "\\" combines to become a single "\", so the filter expression handler sees "\|".)
  • To include a single quote in the value you're searching for, specify four single quotes ('''').
For example, to search for the phrase, That's right!, you would specify 'That''''s right!'.
Examples:
String: 'Paper 123'
Date: '06/06/2007'
Numeric Value: 9383
Empty Field: '' or BLANK