Skip to main content

 

 

 

 

Template:OutSystems/Documentation_KB/Breadcrumb_New_Layout

 

 

Template:OutSystems/OSLanguageSwitcher

 

 

 

OutSystems

Expressions

Template:OutSystems/Documentation_KB/ContentCollaboration
  • Edit
    Collaborate with us
    Edit this page on GitHub
  • An expression consists of operands and operators, or just one operand. For example, n + 1 is an expression with two operands, n and 1, joined by the addition operator +. Here is how you can edit expressions and show the expression values.

    • Use the expression editor to edit expressions. The expression editor shows you available elements. It automatically completes the text and shows suggestions after you press Ctrl+Space.

      Expression editor

    • Edit expressions inline in the properties of elements.

      Expression inline

    • To show the result of an expression, use the expression widget. This is similar to the print command in other programming languages.

      Expression widget

    We've been working on this article. Please let us know how useful this new version is by voting.

    Notes

    Here are some notes about using expressions.

    • You can use many functions to manipulate the type Text, however, you can only use the + (addition) operand with type Text.

      Example: "Hello, " + UserName, where the value of UserName is Billy, returns "Hello, Billy!".

    • You can use the built-in functions to perform various operations on the types Date, Time, and DateTime.

      Example: AddDays(#2020-01-01 00:00:00#, 90). AddDays is a function that adds n days to a Date Time value. Date Time is here a literal #2020-01-01 00:00:00#. The expression returns #2020-03-31 00:00:00#.

    • You can only use the operators = and <> (equality operators) for the type Record.

    • For the type Identifier, use the built-in functions.

    • The types BinaryData and Record List don't support calculations.

    Articles in this Section

    • Operands
      Operands, in an expression, tell the platform which data to use. Read more about literals, variables, and functions.
    • Operators
      OutSystems operators reference.
    • Was this article helpful?