FireDAC Components for REST

Build 23.0.8804

Value Formatters

Value formatters enable you to generate new values with specific formatting. You can use value formatters to perform string, date, and math operations on values.

The general format for invoking formatters is

[ item.attribute | formatter(parameters) | formatter (parameters) | ...]
where formatter is the name of the formatter and parameters is an optional set of parameters to control formatter output. Formatter output can be provided as input to another formatter with the pipe character ("|").


  • In the following snippet any "*" character in the myid attribute's value is replaced by "-", and the resulting value is assigned to
    <api:set attr="" value="[myid | replace('*', '-')]"/>
  • Below, two value formatters are chained with the pipe ("|") character. In the example, only .log files are pushed from the operation.
    <api:call op="fileListDir">
      <api:check attr="name" value="[filename|tolower | endswith('.log')]">

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8804