> For the complete documentation index, see [llms.txt](https://community-test.logicnets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community-test.logicnets.com/release-9/platform-documentation/process-node-parts/format-data-object-format-variable.md).

# Format Data Object (Format Variable)

## Description

The *format data object* part is available in process nodes under the *Data Objects* dropdown menu. It allows you to format a particular data object and present it or process it using parameters related to the data object type. For example, if your data object is a date, this part allows you to format the way your application users see the date. NOTE: This version of the topic relates to LogicNets v7.4+.

**Node Type:** This part is located in process nodes under the *Data Objects* dropdown menu.

**Used With:** This part can be used with all frameworks and on projects not based on a framework.

## Editor Fields

This part displays parameters options based on the type of data object you want to format. The fields the system displays depend on selections you make in the editor.

### All Data Sources

For all data source selections, the system displays the following options:

| Field Name           | Description/Use                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Type/Options                                                                      |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Mode                 | This field tells the system how to handle the data object: either to present it or to process it. Most commonly, users select "Present" to present the results of the formatting. However, it is possible for this node to act like a process node and transform an object variable (e.g. convert a date to a different format) and the result is stored in a new variable that can be used for further processing and/or presented at a later point in the report.                                                                                                                                                 | <p>- Present<br>- Process</p>                                                     |
| Data source          | <p>This is the answer or text you asked the user for that you want to display in your report. It is the data object you identified; for example, if you asked your user for her first name, it would be <em>firstname</em>.<br>If you use the ellipsis (<strong>…</strong>) to choose Data source from the data model the system will complete additional details—such as <em>type</em>—automatically.</p>                                                                                                                                                                                                          | Data object                                                                       |
| Type                 | This tells the system what type of data is provided with the data source. The system displays additional formatting options for some of the data sources; for example, if the data source is a collection the system provides options for displaying a list of items.                                                                                                                                                                                                                                                                                                                                               | <p>- text<br>- number<br>- collection<br>- date<br>- date\_time<br>- currency</p> |
| **Mode = "Process"** |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                                                                                   |
| Format               | <p>When you set <em>Mode</em> to "Process", this field is visible and displays a dropdown menu that tells the system when to process a data object.<br>With Release 8.2+, if you select "Always" you can optionally add text to the <strong>Null value display</strong> box. The system presents this text next to the caption when the data source is null. Consider "not selected" for radiolists, "none checked" for checklists, and "not answered" for text inputs.</p>                                                                                                                                         | <p>- When source has a value<br>- Always</p>                                      |
| Data target          | This field contains the name of the object in which the system stores the formatted result; for example, you could use birthdate as the value the user enters and *birthdate\_formatted* for the date in your desired format.                                                                                                                                                                                                                                                                                                                                                                                       | Text                                                                              |
| Target Type          | <p>If you set <em>Mode</em> to "Process", the system displays this option.<br>- If you select <em>Text</em> the system displays the result as a text string.<br>- If you select <em>HTML</em> the system outputs an HTML-encoded string that can be used safely in a form-part node. By default, the system escapes the HTML input. You can disable this using the "Do not escape" parameter, which is available when <em>Type</em>=<em>Text</em> or <em>Collection</em> and <em>Mode</em>=<em>Present</em> OR when <em>Mode</em>=<em>Present</em> and <em>Target Type</em>=<em>HTML</em>.</p>                      | <p>- Text<br>- HTML</p>                                                           |
| **Mode = "Present"** |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                                                                                   |
| Data source type     | This tells the system whether to show the value the user entered/selected or the caption assigned to their selection option in *Data source*. Note: If you select "Caption" but your item does not have an assigned caption the data item will not display.                                                                                                                                                                                                                                                                                                                                                         | <p>- Value<br>- Caption</p>                                                       |
| Caption              | <p>If your item does not contain a caption but you want to display one in your report you can enter it in this field.<br>When choosing the data source from the data model the caption is automatically populated with the question, but you can edit this field to include any alphanumeric text, HTML codes, and other variables from the context (the syntax is $(variable\_name)).</p>                                                                                                                                                                                                                          | Text                                                                              |
| Escape $(..)-caption | <p>Check this box if your data object includes $(..) variables that should NOT be encoded. For example:<br><code>mytext = "\<b>Hello\</b></code><br><code>$(mytext) will appear as Hello (off) or \<b>Hello\</b> (on)</code><br>If the data object contains several interpolations and only some of them need to be escaped, use the <em>$(html(mytext))</em> construction to turn off escaping for specific output.<br><code>$(html(mytext)) appears as Hello</code></p>                                                                                                                                           | On \| Off                                                                         |
| Show caption         | <p>If you set Mode to "Present" this field is visible. With this field you tell the system to either show the caption you have for the item by selecting "Always", or to hide the caption if the user did not provide an answer to the question. To do this you use "When source has a value".'<br>With Release 8.2+, if you select "Always" you can optionally add text to the <strong>Null value display</strong> box. The system presents this text next to the caption when the data source is null. Consider "not selected" for radiolists, "none checked" for checklists, "not answered" for text inputs.</p> | <p>- When source has a value<br>- Always</p>                                      |
| Prefix               | You can opt to put information after before the user's answer or leave it blank. This field will accept HTML and other variables in the $(variable\_name) format. Enter a space after the text in the prefix field to force a gap between the prefix and the user's answer.                                                                                                                                                                                                                                                                                                                                         | Text                                                                              |
| Postfix              | You can opt to put information after your user's answer or leave it blank; for example, if you have asked in the question for a unit of measure you could put "mm" or "inches" after the user's answer in the report. This field will accept HTML and other variables in the $(variable\_name) format. Enter a space first in the postfix field to force a gap between the user's answer and the provided postfix.                                                                                                                                                                                                  | Text                                                                              |

### Data Source Type = Text

If the data source type you want to format is "text" the system displays the following options in addition to the ones in the *All Data Sources* section:

| Field Name         | Description/Use                                                                                                                               | Type/Options |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| Do not escape HTML | If you have used HTML codes in the value template, check this option to prevent the security features from presenting the HTML codes as text. | Checkbox     |
| Character limit    | This tells the system how many characters to display.                                                                                         | Number       |

### Data Source Type = Number or Currency

If the data source type you want to format is "number" or "currency" the system displays the following options in addition to the ones in the *All Data Sources* section:

| Field Name                                | Description/Use                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Type/Options                                                                  |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| Decimals                                  | This field identifies the number of decimal places required in the answer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Number                                                                        |
| Round/Truncate                            | <p>Choose from the following options:<br>- system default: If you choose this option system reads the value specified in the SystemConfig package. It allows you to maintain and/or update consistent choices across your application.<br>- - This does not round or truncate the number.<br>- Truncate: This truncates the number to the specified number of decimals.<br>- Round: This rounds the number to the specified number of decimals above.<br>- Round whole: This rounds to the number of digits to the left of the decimal point.</p> | <p>- system default<br>- (none)<br>- truncate<br>- round<br>- round whole</p> |
| Decimal separator                         | <p>Choose from the following options:<br>- system default: If you choose this option system reads the value specified in the SystemConfig package. It allows you to maintain and/or update consistent choices across your application.<br>- . (dot): This enters a dot as the decimal separator; 123.456, for example.<br>- , (comma): This enters a comma as a decimal separator; 123,456, for example.</p>                                                                                                                                      | <p>- system default<br>- dot<br>- comma</p>                                   |
| Thousands separator                       | <p>Choose from the following options:<br>- system default: If you choose this option system reads the value specified in the SystemConfig package. It allows you to maintain and/or update consistent choices across your application.<br>- . (dot): This enters a dot as the thousands separator; 123.456, for example.<br>- , (comma): This enters a comma as the thousands separator; 123,456, for example.</p>                                                                                                                                | <p>- system default<br>- dot<br>- comma</p>                                   |
| Brackets around negative numbers          | <p>Choose from the following options:<br>- system default: If you choose this option system reads the value specified in the SystemConfig package. It allows you to maintain and/or update consistent choices across your application.<br>- No: The system will display negative numbers without parentheses; for example, -123456.<br>- Yes: The system will display negative numbers with parentheses; for example, (123456).</p>                                                                                                               | <p>- system default<br>- No<br>- Yes</p>                                      |
| <p>Currency symbol<br>(currency only)</p> | This field allows you to enter the text/symbol for currency; for example, *GBP* or *$*.                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Text                                                                          |
| <p>Symbol location<br>(currency only)</p> | <p>Choose from the following options:<br>- system default: If you choose this option system reads the value specified in the SystemConfig package. It allows you to maintain and/or update consistent choices across your application.<br>- Prefix: The system displays the symbol in front of the number.<br>- Postfix: The system displays the symbol after the number.</p>                                                                                                                                                                     | <p>- system default<br>- Prefix<br>- Postfix</p>                              |

### Data Source Type = Collection

If the data source type you want to format is "collection" the system displays the following options in addition to the ones in the *All Data Sources* section:

| Field Name     | Description/Use                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Type/Options                                                                                                                         |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| List view      | This allows you to set the format options for displaying your list.                                                                                                                                                                                                                                                                                                                                                                                                                                                     | <p>- Comma<br>- \*-separator<br>- custom<br>- comma and<br>- bullets<br>- list<br>- quoted and comma separated<br>- no delimiter</p> |
| Key            | This field specifies the object within the collection you want to display in your report. As an example, if you have a collection with *user\_choice\[1].preference* and *user\_choice\[1].state* enter "state" in this field to show only that set of objects.                                                                                                                                                                                                                                                         | Text                                                                                                                                 |
| Value template | <p>You can use this field to display multiple items from a collection in your report. Each key or object has to be defined as $(object). Other text and HTML is also allowed in the field, but you should not include contextual variables that do not exist in the collection. Example: a value template of #$(preference) - $(state) would deliver<br>#1 – NY<br>#2 – CA<br>#3 – DC<br>It is also possible to include div classes and/or column HTML elements to create and style these values in a table format.</p> | Text                                                                                                                                 |

### Data Source Type = Date

If the data source type you want to format is "date" the system displays the following options:

| Field Name                                       | Description/Use                                                                                                                                                                                                                                                                                                              | Type/Options |
| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| Date format                                      | This tells the system how to display the date. You can use options such as **dd-mm-yy** to show two digits for the date, two digits for the month, and two digits for the year with a dash between each. Note: you must use lowercase letters.                                                                               | Text         |
| Date format (when only month/year are available) | This tells the system how to display the date if only the month and year are available. Enter your formatting into the field using options such as **mm/yy** to show the month with two numbers and the year with two numbers; for example, February 2019 would display as 02/19. Note: You must use lowercase letters.      | Text         |
| Date format (when only year is available)        | This tells the system how to display the date if only the year is available. Enter your formatting into the field using either **yy** or **yyyy** to show the year with all four numbers or with only to numbers. As an example, if you put **yy** the system will display 2019 as 19. Note: You must use lowercase letters. | Text         |

### Data Source Type = date\_time

If the data source type you want to format is "date\_time" the system displays the following options:

| Field Name                                       | Description/Use                                                                                                                                                                                                                                                                                                                          | Type/Options |
| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| Input type                                       | This dropdown allows you to select the input type used for your date\_time: YYYYMMDD.HHMMSS \| Epoch                                                                                                                                                                                                                                     | Datetime     |
| Time zone                                        | This dropdown allows you to determine if the system uses the time zone of the server on which your application is hosted or GMT as the time zone of your data object: Server \| GMT                                                                                                                                                      | Dropdown     |
| Date format                                      | This tells the system how to display the date. You can use **%d %b %Y** for 14 Feb 2019, for instance. See the table below for acceptable date formats. Additional characters can be used -- so %d xxx %m will show a date as 14 xxx Feb, for example.                                                                                   | Text         |
| Date format (when only month/year are available) | This tells the system how to display the date if only the month and year are available. Enter your formatting into the field using options such as **mm/yy** to show the month with two numbers and the year with two numbers; for example, February 2019 would display as 02/19. See the table below for other acceptable formats.      | Text         |
| Date format (when only year is available)        | This tells the system how to display the date if only the year is available. Enter your formatting into the field using either **yy** or **yyyy** to show the year with all four numbers or with only to numbers. As an example, if you put **yy** the system will display 2019 as 19. See the table below for other acceptable formats. | Text         |
| Date/Time separator                              | This is the character the system will display between the date and time. If this field is blank the system will use a space as the default separator.                                                                                                                                                                                    | String       |
| Time format                                      | This tells the system which format to use to set the time. You can use options like **%I:%M %p** to show the Meridian time. See the table below for other acceptable formats.                                                                                                                                                            | Text         |
| Do not escape HTML                               | If you have used HTML codes in the value template, check this option to prevent the security features from presenting the HTML codes as text.                                                                                                                                                                                            | Checkbox     |
| Character limit                                  | This field allows you to set a limit on the number of characters the system displays in the report.                                                                                                                                                                                                                                      | Number       |

### Acceptable Date Formats

The following table details the codes you can use to create acceptable date formats.

| %a | abbreviated weekday name (e.g., Wed)      |
| -- | ----------------------------------------- |
| %A | full weekday name (e.g., Wednesday)       |
| %b | abbreviated month name (e.g., Sep)        |
| %B | full month name (e.g., September)         |
| %c | date and time (e.g., 09/16/98 23:48:10)   |
| %d | day of the month (16) \[01-31]            |
| %H | hour, using a 24-hour clock (23) \[00-23] |
| %I | hour, using a 12-hour clock (11) \[01-12] |
| %M | minute (48) \[00-59]                      |
| %m | month (09) \[01-12]                       |
| %p | either "am" or "pm" (pm)                  |
| %S | second (10) \[00-61]                      |
| %w | weekday (3) \[0-6 = Sunday-Saturday]      |
| %x | date (e.g., 09/16/98)                     |
| %X | time (e.g., 23:48:10)                     |
| %Y | full year (1998)                          |
| %y | two-digit year (98) \[00-99]              |
| %% | the character '%'                         |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://community-test.logicnets.com/release-9/platform-documentation/process-node-parts/format-data-object-format-variable.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
