Portlet Factory, Version 6.1.2


 

Comparison results

This topic describes comparison results that adhere to Java conventions.

Comparing numerical characters as Strings

Often, a string value consists of numerical characters. For example, an employee ID may be stored in a database as a string, but consists of numerical characters such as "000010." String comparisons of numerical characters use the character's ASCII values to determine comparison results. For example, the 1 > 2 comparison yields 'false' because the ASCII value for 1 (decimal value '49') is less than the ASCII value for 2 (decimal value '50').

IsBetween Comparisons

These comparisons are inclusive. For example, a comparison of 5 to "is between 5 and 10" evaluates to true. Any number between 5 and 10, including 5 and 10, is considered to be between 5 and 10.

IsNotFalse/Null Comparisons

The IsNotFalse/Null comparison evaluates to 'true' in the following cases:

  • Any String value with the exception of 'false.' For example, a value "FALSE" yields 'true' while a value of "false" yields 'false'.

  • Numerical or Automatic comparisons of values that yield anything other than '0'. For example, '1' yields 'true'.

The IsNotFalse/Null comparison evaluates to 'false' in the following cases:

  • String comparisons that yield empty strings or 'false'.

  • Numerical comparisons that yield '0'.

Matches Regular Expression

Use this comparison to see if a text segment conforms to some pattern, using the standard "regular expression" notation. (IBM® WebSphere Portlet Factory supports the regular expression language implemented by Jakarta Regexp.) Here are some examples:

Factory

To match text containing the word "Factory." Match would be true for "Factory" and for "This is not Factory!"

^Factory$

To match text containing only the word "Factory" and nothing else.

[0-9]{3}-[0-9]{3}-[0-9]{4}

To match a phone number such as 123-457-7890. Alternately, [:digit:]{3}-[:digit:]{3}-[:digit:]{4}

([^:alnum:]+)[:space:]+(\1)

To match repeating words or fragments thereof separated by white space.

Parent topic: Action List builder Related concepts

About using the builder call editor

About using arguments with an action

About using special actions

Web Service Enable builder Related tasks

Creating a comment action

Creating an action that returns a value

Creating an action that assigns or appends a value to a variable

Creating conditional action lists

Profiling actions in an action list

Profiling actions on and off in an action list Related reference

Action List builder inputs Related information

Jakarta regexp package


Library | Support |