K2 BLACKPEARL PRODUCT DOCUMENTATION: USER GUIDE
Special Operators

Inline Functions - Build Expression

Special Operators

Operator Description Example
when Used to execute one of two sub-expressions based on a condition.

Input Value: when 1=1 then "yes" otherwise "no"
Result: "yes"

format Used to format a non-textual value into a textual value. Input Value: 1 format "0.0"
Result: 1.0

When (Complex)

This operation allows you to select which piece of the expression you would like to execute based on a Boolean (true/false) value. For instance:

Copy

when 5 > 10 then "Yes" otherwise "No"

= when false then "Yes" otherwise "No"

= "No"

More generally, when condition then true part otherwise false part

There are two restrictions:

The expression engine will not evaluate the true part or false part if it does not need to. This means if you have a SmartObject Create in the true part and the condition is false then the SmartObject Create will not be called.

Format (Inset)

The format operator allows you to format a number, date, etc. according to a certain format string. For instance: [DateField] format "yyyy mm dd". It The standard .Net formatting format is used.

The following online references can be found:

Dates:

  • http://msdn.microsoft.com/en-us/library/az4se3k1.aspx
  • http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
Numbers:

  • http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx
  • http://msdn.microsoft.com/en-us/library/0c899ak8.asp
See Also

 

 


K2 blackpearl Help 4.6.11 (4.12060.1731.0)