Difference between revisions of "Field Values in Expressions"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
====FIELD_VALUE====
====FIELD_VALUE====
:The search value - a string, a date, a number.
:The search value - a string, a date, a number.
:Examples:
::String: <tt>'Paper 123'</tt>
::Date: <tt>'06/06/2007'</tt>
::Numeric Value: <tt>9383</tt>
::Empty Field: <tt><nowiki>''</nowiki></tt> or <tt>BLANK</tt>


:Follow these guidelines when specifying values:  
:Follow these guidelines when specifying values:  
:*The value can be partial text or whole words
::*The value can be partial text or whole words
 
:*Enclose strings and date/time values in 'single quotes'


:*To specify date values, use the [[Date Format]] as specified in [[Company Information]]
::*Enclose strings and date/time values in 'single quotes'


:*To search for a blank (empty) string, use two single quotes, with nothing between them (<tt><nowiki>''</nowiki></tt>).
::*To specify date values, use the [[Date Format]] as specified in [[Company Information]]


:*To search for a blank (empty) field of other kinds, use a field value of <tt>BLANK</tt>
::*To search for a blank (empty) string, use two single quotes, with nothing between them (<tt><nowiki>''</nowiki></tt>).


:*To search for multiple field values, separate each value using vertical pipe (|)
::*To search for a blank (empty) field of other kinds, use a field value of <tt>BLANK</tt>
::For example: <tt>company_name='Acme|Ajax'</tt>
::(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: \|.
::*To search for multiple field values, separate each value using vertical pipe (|)
::* That works in REST APIs and in the GUI.
:::For example: <tt>company_name='Acme|Ajax'</tt>
::* In Java strings, the backslash is already an escape character. (It combines with the one that follows it to create a single character.)
:::(The criteria is satisfied when the company name is either Acme or Ajax)
::*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 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: \|. For example, <tt>company_name contains '\|'</tt>
::For example, to search for the phrase, <tt>That's right!</tt>, you would specify <tt><nowiki>'That''''s right!'</nowiki></tt>.
:::* 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 first two (\\) combine to become a single backslash (\), so the filter expression handler sees "\|", as desired.)
:::* Finally, note that "equals" does not work for this particular search. The required operator is "contains".


::Examples:
::*To include a single quote in the value that you are searching for, specify an additional quote for every single quote (<tt><nowiki>''</nowiki></tt>).
:::String: <tt>'Paper 123'</tt>
:::For example in business rules, in the execution criteria use the single quote as listed in the following images:
:::Date: <tt>'06/06/2007'</tt>
:::*When specified conditions are true:
:::Numeric Value: <tt>9383</tt>
::::[[File:single_quote_condition.png]]
:::Empty Field: <tt><nowiki>''</nowiki></tt> or <tt>BLANK</tt>
:::*When specified expression is true:
::::[[File:single_quote_expression.png]]

Latest revision as of 07:15, 15 February 2019

FIELD_VALUE

The search value - a string, a date, a number.
Examples:
String: 'Paper 123'
Date: '06/06/2007'
Numeric Value: 9383
Empty Field: '' or BLANK
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: \|. For example, company_name contains '\|'
  • 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 first two (\\) combine to become a single backslash (\), so the filter expression handler sees "\|", as desired.)
  • Finally, note that "equals" does not work for this particular search. The required operator is "contains".
  • To include a single quote in the value that you are searching for, specify an additional quote for every single quote ('').
For example in business rules, in the execution criteria use the single quote as listed in the following images:
  • When specified conditions are true:
Single quote condition.png
  • When specified expression is true:
Single quote expression.png