Files
help365/platform/360027003711.html
koziavin 00717a92fb
All checks were successful
Deploy Static Site / deploy (push) Successful in 6m6s
update
2025-05-29 16:42:45 +04:00

616 lines
80 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<title>Template syntax</title>
<meta name="generator" content="Help+Manual" />
<meta name="keywords" content="" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Document templates that you use in the system can contain text, variables, functions, conditions, and loops. When adding a template to a business process, you can bind fields..." />
<meta name="picture" content="" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Full documentation for BRIX365 platform. Low-code developer guide. User guide. Admin guide. Developer guide." />
<meta property="og:url" content="https://brix365.com/en/help" />
<meta property="og:image" content="" />
<link rel="icon" href="favicon.png" type="image/png" />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="./jquery-ui.min.css" />
<link rel="stylesheet" href="default.css" />
<link rel="stylesheet" href="./search-yandex.css" />
<link rel="stylesheet" href="./article.css" />
<link rel="stylesheet" href="./glossary.css" />
<link rel="stylesheet" href="./theme.css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="helpman_settings.js"></script>
<script type="text/javascript" src="helpman_topicinit.js"></script>
<script type="text/javascript" src="highlight.js"></script>
<script type="text/javascript">
$(document).ready(function(){highlight();});
</script>
</head>
<body>
<script>!function(e,t,c,n,r,a,m){e.ym=e.ym||function(){(e.ym.a=e.ym.a||[]).push(arguments)},e.ym.l=1*new Date;for(var s=0;s<document.scripts.length;s++)if(document.scripts[s].src===n)return;a=t.createElement(c),m=t.getElementsByTagName(c)[0],a.async=1,a.src=n,m.parentNode.insertBefore(a,m)}(window,document,"script","https://mc.yandex.ru/metrika/tag.js"),ym(83179930,"init",{clickmap:!0,trackLinks:!0,accurateTrackBounce:!0,webvisor:!0})</script><noscript><div><img alt=""src=https://mc.yandex.ru/watch/83179930 style=position:absolute;left:-9999px></div></noscript>
<header class="header elma-365">
<div class="container">
<a class="header__logo" href="https://brix365.com/en/help">
<img src="./logo-en.svg" alt="header logo">
</a>
<!-- <div class="hero__search-form" id="search-panel">
<form class="search-form" onsubmit="ym(83180416,'reachGoal','poisk')">
<label class="search-form__label">
<span id="reset-search" class="search__icon"></span>
<input class="search-form__input" type="text">
</label>
<input class="search-form__submit" type="submit" value="Submit">
</form>
</div> -->
<div class="hero__search-form" id="search-panel"> <form class="search-form"> <label class="search-form__label"> <span id="reset-search" class="search__icon"></span> <input class="search-form__input" type="text"> </label> <input class="search-form__submit" type="submit" value="Submit"> </form> </div>
<div class="hero__search">
<a href="#" id="search-icon" class="hero__search-icon">
<img src="search-icon-white.svg" alt="search string">
</a>
<a href="#" id="side-menu-icon" class="hero__side-icon">
<img src="side_menu.svg" alt="side menu">
</a>
</div>
<div class="header__navi">
<ul class="header__list"><li><span class="solution-select"><span class="solution-select__selected"></span><svg width="7" height="4" viewBox="0 0 7 4" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L3.5 3.5L6 1" stroke="white" stroke-linecap="round" stroke-linejoin="round"/></svg><ul class="solution-select__list"><li><a class="project-link" href="https://brix365.com/en/help/platform/get-trial.html">Platform</a></li><li><a class="project-link" href="https://brix365.com/en/help/ecm/ecm-functions.html">ECM</a></li><li><a class="project-link" href="https://brix365.com/en/help/crm/crm_overview.html">CRM</a></li><li><a class="project-link" href="https://brix365.com/en/help/service/service-functions.html">Service</a></li><li><a class="project-link" href="https://brix365.com/en/help/projects/projects-functions.html">Projects</a></li><li><a class="project-link" href="https://brix365.com/en/help/business_solutions/-elma365-store.html">Business Solutions</a></li></ul></span></li><li><a href="https://api.brix365.com/en/" target="_blank">API</a></li><li><a href="https://tssdk.brix365.com/" target="_blank">SDK</a></li></ul>
</div>
</div>
</header>
<main class="main container">
<aside class="sidebar" id="sidebar">
<div class="sidebar__header">
<a class="header__logo" href="https://brix365.com/en/help">
<img src="./logo-light-en.svg">
</a>
<span class="sidebar__close elma-365-close" id="close"></span>
</div>
<div class="sidebar__wrapper" id="side-menu">
</div>
</aside>
<article class="article" id="article">
<div class="article-inner">
<div class="content">
<header class="article__header">
<div class="article__bread" style="display:flex; gap:10px;">
<span id="subcategory" class="search-res__item-category search-res__item-category_subcategory subcategory article__badge"></span>
<div class="topic__breadcrumbs">
<p>Business process designer &gt; <a href="360026936731.html">Document templates</a> / Template syntax</p>
</div>
</div>
<div class="topic__title"><h1 class="p_Heading1" style="text-align: center; line-height: 1.20; margin: 19px 0 19px 0;"><span class="f_Heading1" style="font-size: 32px;">Template syntax</span></h1>
</div>
</header>
<section class="article__content">
<div class="scroll-top-inner">
<a href="#h1-article" class="scroll-top"></a>
</div>
<!-- Placeholder for topic body. -->
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><a href="360026936731.html" class="topiclink">Document templates</a> that you use in the system can contain text, variables, functions, conditions, and loops. When adding a template to a business process, you <a href="360026720792.html#bind_shablon" class="topiclink">can bind fields</a> of your template with process context variables.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">To prepare a template, use:</p>
<ul style="list-style-type:disc">
<li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;">Functions:<ul style="list-style-type:circle">
<li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><a href="360027003711.html#to-string" class="topiclink">ToString()</a> to display different types of data in a variable.</li><li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><a href="360027003711.html#date_time_function" class="topiclink">DateTime()</a> to display the date and time in a certain format considering a locale.</li><li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><a href="360027003711.html#count-function" class="topiclink">Count()</a> to display the number of items in a table or app.</li><li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;">Other special functions — <code><b>Barcode</b></code>, <code><b>JobPosition</b></code>, <code><b>PasteImage</b></code>, <code><b>HYPERLINK</b></code>, and <code><b>ExtText</b></code>. Read more in the <a href="another-template-syntax-functions.html" class="topiclink">Special functions of template syntax</a> article.</li></ul>
<li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><a href="360027003711.html#if" class="topiclink">Conditions</a> to display the text that meets a given condition.</li><li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><a href="360027003711.html#for" class="topiclink">For loop</a> to display data as a list or table.</li></ul>
<h2 class="p_Heading2"><span class="f_Heading2">Variable syntax</span></h2>
<p class="p_Normal" style="line-height: 1.20; margin: 19px 0 0 0;">All the variables in a template must be unique and have the following form: <code><b>{$variable_name}</b></code>. For example, you can use the <code><b>{$contractor}</b></code> variable to insert the contractor<span style="font-family: Inter;"></span>s name in an agreement created within a <a href="360026720792.html" class="topiclink">business process</a>.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 19px 0 0 0;">In the template you can use field attributes from the app context, i.e. access nested variables. Available for fields of the <a href="360009707032.html#file_type" class="topiclink">Files</a>, <a href="360009707032.html#users" class="topiclink">Users</a>, <a href="360009707032.html#app" class="topiclink">App</a>, <a href="360009707032.html#arbitrary-app" class="topiclink">Arbitrary app</a>, etc. type.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 19px 0 0 0;">For example, an order has the <span style="font-weight: bold;">Contract</span> field (code <code><b>contract</b></code>), where the contract file is loaded, and the <span style="font-weight: bold;">Client</span> field (code <code><b>client</b></code>), where the <span style="font-weight: bold;">Contacts</span> app item is added. In the generated document you can display the file name or phone number of the client. To do this, the syntax of the template uses the code of the field from the source appl and the code of the nested variable separated by a dot: <code><b>{$contract.__name}</b></code> or <code><b>{$client.phone}</b></code>.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 19px 0 0 0;">When writing functions, arguments and variable values are enclosed in quotation marks. The following types of quotation marks are allowed: <span style="font-weight: bold;">&quot; &quot;, « », “ “, ” ”, ' '</span>.</p>
<h2 class="p_Heading2"><span class="f_Heading2">Functions for working with strings</span></h2>
<p class="p_Normal" style="line-height: 1.20; margin: 19px 0 0 0;">These functions allow you to display text in different formats.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">For illustration, we will use the <code><b>$string1</b></code> variable and the phrase <span style="font-weight: bold;">Order shipped</span> as its value.</p>
<ol style="list-style-type:upper-roman">
<li value="1" class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>UpperCase(&lt;param1: string&gt;)</b></code>. Converts text to uppercase.</li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p style="line-height: 1.20; margin: 14px 0 0 0;">Example</p>
<p style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>{UpperCase({$string1})}</b></code>&gt; ORDER SHIPPED</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<ol style="list-style-type:upper-roman" start="2">
<li value="2" class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>LowerCase(&lt;param1: string&gt;)</b></code>. Converts text to lowercase.</li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p style="line-height: 1.20; margin: 14px 0 0 0;">Example</p>
<p style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>{LowerCase({$string1})}</b></code>&gt; &nbsp;order shipped</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<ol style="list-style-type:upper-roman" start="3">
<li value="3" class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>Capitalize(&lt;param1: string&gt;)</b></code>.<span style="font-weight: bold;"> </span>Capitalizes the first word in the text.</li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p style="line-height: 1.20; margin: 14px 0 0 0;">Example</p>
<p style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>{Capitalize({$string1})}</b></code>&gt; Order shipped </p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<ol style="list-style-type:upper-roman" start="4">
<li value="4" class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>Substr(&lt;param1: string&gt;, &lt;from: number&gt;, &lt;length: number&gt;)</b></code>.<span style="font-weight: bold;"> </span>Extracts a part of the text, starting with the specified character <code><b>&lt;from&gt;</b></code> and continuing for the specified number of characters <code><b>&lt;length&gt;</b></code>. </li></ol>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">You can fill in only <code><b>&lt;from&gt;</b></code> to keep all the text after the specified character.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Examples</p>
<ol style="list-style-type:decimal">
<li value="1" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>{Substr({$string1}, 0, 3)}</b></code>&gt; Ord.</li><li value="2" style="line-height: 1.20;"><code><b>{Substr({$string1}, 4)}</b></code>&gt; r shipped.</li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal">&nbsp;</p>
<h2 class="p_Heading2"><a id="to-string" class="hmanchor"></a><span class="f_Heading2">ToString() function</span></h2>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">The <code><b>ToString</b></code> function allows you to insert the following data types into your document:</p>
<ul style="list-style-type:disc">
<li style="line-height: 1.20;"><a href="360027003711.html#number" class="topiclink">Number</a>.</li><li style="line-height: 1.20;"><a href="360027003711.html#string" class="topiclink">String</a>.</li><li style="line-height: 1.20;"><a href="360027003711.html#string" class="topiclink">Category</a>.</li><li style="line-height: 1.20;"><a href="360027003711.html#yes_no" class="topiclink">Yes/No switch</a>.</li><li style="line-height: 1.20;"><a href="360027003711.html#money" class="topiclink">Money</a>.</li><li style="line-height: 1.20;"><a href="360027003711.html#name" class="topiclink">Full name</a>.</li><li style="line-height: 1.20;"><a href="360027003711.html#phone" class="topiclink">Phone number</a>.</li><li style="line-height: 1.20;"><a href="360027003711.html#date_time" class="topiclink">Date/Time</a>.</li></ul>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">You can read more about the types of data used in the system in the <span style="background-color: #ffffff;"><a href="360009707032.html" class="topiclink">System data types</a></span> article.</p>
<h3 class="p_Heading3"><a id="number" class="hmanchor"></a><span class="f_Heading3">Number </span></h3>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Syntax:<span style="font-weight: bold;"> </span><code><b>ToString(param1: number, &lt;format: string&gt;, &lt;locale: string&gt;)</b></code></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">For illustration we will use the variable <code><b>$int1</b></code><span style="font-style: italic;"> </span>and its value 546.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p style="line-height: 1.20; margin: 14px 0 0 0;">Example</p>
<p style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>{ToString({$int1})}</b></code>&gt; 546</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">By default, the number is displayed as digits. Use the <code><b>astext</b></code> format to write it as text.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;внимание</span></p>
<p style="line-height: 1.20; margin: 14px 0 0 0;">Please note that fractions cannot be displayed as text.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;внимание</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p style="line-height: 1.20; margin: 14px 0 0 0;">Example</p>
<p style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>{ToString({$int1}, astext)}</b></code>&gt; five hundred forty-six</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal">You can specify a locale to output as text in another language. Available locales:</p>
<ol style="list-style-type:decimal">
<li value="1" class="p_Normal">English: <code><b>en-US</b></code> or <code><b>en</b></code></li><li value="2" class="p_Normal">Russian: <code><b>ru-RU</b></code> or <code><b>ru</b></code></li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p style="line-height: 1.20; margin: 14px 0 0 0;">Example</p>
<p style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>{ToString({$int1}, astext, enUS)}</b></code>&gt;five hundred forty-six</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal">&nbsp;</p>
<h3 class="p_Heading3"><a id="string" class="hmanchor"></a><span class="f_Heading3">String</span></h3>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Strings allow you to add text-based information to your document.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Syntax: <code><b>ToString(param1: string)</b></code>.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">For illustration, we will use the variable <code><b>$str1</b></code> and its value <span style="font-weight: bold;">sent for approval</span>.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p style="line-height: 1.20; margin: 14px 0 0 0;"><a id="category" class="hmanchor"></a>Example</p>
<p style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>{ToString({$str1})}</b></code>&gt; sent for approval.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<h3 class="p_Heading3"><span class="f_Heading3">Category</span></h3>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">The <span style="font-weight: bold;">Category</span> data type is used for selecting a value from a list, for example, when users choose the payment method: credit card or cash.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Syntax: <code><b>ToString(param1: category)</b></code>.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">When a context variable of this type is created in a process, it is given a name and a code. Specify the code in the <code><b>ToString</b></code> function so that the name of the variable is added to the document.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">For illustration, we will use the variable <code><b>$enum1</b></code> and payment with credit card as its value: <code><b>{ "code": "card"; "name": "credit card" }</b></code>.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p style="line-height: 1.20; margin: 14px 0 0 0;">Example</p>
<p style="line-height: 1.20; margin: 14px 0 0 0;">The selected payment method is <code><b>{ToString({$enum1})}</b></code>&gt; The selected payment method is credit card.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal">Also, for the <span style="font-weight: bold;">Category</span> data type, you can output the category name and code to the template without using the <code><b>ToString</b></code> function.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal">Example</p>
<ol style="list-style-type:decimal">
<li value="1" class="p_Normal">The selected payment method is <code><b>{$enum1.name}</b></code>&gt; &nbsp;The selected payment method is credit card.</li><li value="2" class="p_Normal">The selected payment method is <code><b>{$enum1}</b></code>&gt; The selected payment method is credit card.</li><li value="3" class="p_Normal">Code of the used category: <code><b>{$enum1.code}</b></code>&gt; Code of the used category is card.</li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal">&nbsp;</p>
<h3 class="p_Heading3"><a id="yes_no" class="hmanchor"></a><span class="f_Heading3">Yes/No switch</span><span class="f_Heading4"> </span></h3>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">This data type has two variants: <span style="font-weight: bold;">Yes</span> and <span style="font-weight: bold;">No</span>. You can rename them, for example, to <span style="font-weight: bold;">Approved</span> and <span style="font-weight: bold;">Rejected</span>.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">For illustration, we will use <code><b>$bool1 = true</b></code>. The <span style="font-weight: bold;">Yes</span> variant (<code><b>yesValue</b></code>) is renamed as <span style="font-weight: bold;">Approved</span>.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p style="line-height: 1.20; margin: 14px 0 0 0;">Example</p>
<p style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>{ToString({$bool1})}</b></code>&gt; Approved.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<h3 class="p_Heading3"><a id="money" class="hmanchor"></a><span class="f_Heading3">Money</span></h3>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">You can convert an amount of money to text in various formats.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Syntax: <code><b>ToString(param1: money, &lt;format: string&gt;, &lt;locale: string&gt;)</b></code>.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">The following format values are available:</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Example</p>
<p style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>short</b></code> &nbsp;&gt; 1,005.56 (separators depend on the locale).</p>
<p style="line-height: 1.20;"><code><b>sign</b></code><span style="font-weight: bold;"> </span>&gt; USD1,005.56.</p>
<p style="line-height: 1.20;"><code><b>full</b></code><span style="font-weight: bold;"> </span>&gt; 1,005 US dollars 56 cents.</p>
<p style="line-height: 1.20;"><code><b>astext</b></code><span style="font-weight: bold;"> </span>&gt; One thousand five US dollars 56 cents.</p>
<p style="line-height: 1.20;"><code><b>wildcard</b></code><span style="font-weight: bold;"> </span>&gt; you can specify your custom format, for example, <code><b>{ToString({$money1}, "%i usd %f cents")}</b></code>. In this case the amount will be converted to text in the following manner: 1005 usd 56 cents (<code><b>%i</b></code> is the integer part, <code><b>%f</b></code> is the fractional part).</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal">You can specify a locale in the function. Available locales:</p>
<ul style="list-style-type:disc">
<li class="p_Normal">Russian — <code><b>ruRU</b></code> or <code><b>ru</b></code>.</li><li class="p_Normal">English — <code><b>enUS</b></code> or <code><b>en</b></code>.</li></ul>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal">Example</p>
<p class="p_Normal"><code><b>{ToString({$money1}, full, en)}</b></code>&gt; 1 005 rubles 56 kopecks.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<h3 class="p_Heading3"><a id="name" class="hmanchor"></a><span class="f_Heading3">Full name</span></h3>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">You can insert a person<span style="font-size: 15px; font-family: Calibri,Vectora,'Droid Sans','Open Sans',Frutiger,sans-serif;"></span>s full name into a document.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Syntax: <code><b>ToString(param1: full name, &lt;format: string&gt;, &lt;case: string&gt;)</b></code>.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><a class="dropdown-toggle" style="font-style: normal; font-weight: normal; color: #000000; background-color: transparent; text-decoration: none;" href="javascript:HMToggle('toggle','TOGGLE0186A1')">Available format values</a></p>
<div id="TOGGLE0186A1" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 14px 0 0 0;"><table style="border:none; border-spacing:0;">
<tr>
<td style="vertical-align:top; padding:0; border:none"><p class="p_Normal" style="line-height: 1.20;">&nbsp;<br />
<code><b>long</b></code>. Use it to insert the last name, first name, and the middle name (Anna Maria Quan).</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>short</b></code>.<span style="font-weight: bold;"> </span>Use it to insert the last name and the initials (A M. Quan).</p>
</td>
</tr>
</table>
</div>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><a class="dropdown-toggle" style="font-style: normal; font-weight: normal; color: #000000; background-color: transparent; text-decoration: none;" href="javascript:HMToggle('toggle','TOGGLE0186A2')">Available case values (for languages where they are applied)</a></p>
<div id="TOGGLE0186A2" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 14px 0 0 0;"><table style="border:none; border-spacing:0;">
<tr>
<td style="vertical-align:top; padding:0; border:none"><p class="p_Normal" style="line-height: 1.20;">&nbsp;<br />
<code><b>nominative</b></code>. Nominative.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>genitive</b></code>. Genitive.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>dative</b></code>. Dative.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>accusative</b></code>. Accusative.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>instrumental</b></code>. Instrumental.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>prepositional</b></code>. Prepositional.</p>
</td>
</tr>
</table>
</div>
<p class="p_Normal">If you want to specify a person<span style="font-family: Calibri,Vectora,'Droid Sans','Open Sans',Frutiger,sans-serif;">s first name, last name, or middle name by itself, use values from the </span><span style="font-family: Calibri,Vectora,'Droid Sans','Open Sans',Frutiger,sans-serif; font-weight: bold;">Full name</span><span style="font-family: Calibri,Vectora,'Droid Sans','Open Sans',Frutiger,sans-serif;"> variable, for example, </span><code><b>{$executor.fullname.firstname}</b></code><span style="font-family: Inter; color: #394149;">, </span><code><b>{$executor.fullname.lastname}</b></code><span style="font-family: Inter; color: #394149;">, and </span><code><b>{$executor.fullname.middlename}</b></code><span style="font-family: Inter; color: #394149;">.</span></p>
<h3 class="p_Heading3"><a id="phone" class="hmanchor"></a><span class="f_Heading3">Phone number</span></h3>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">You can set up a mask for phone number input by using the following syntax: <code><b>ToString({$phone1}, "+1XXXXXXXXXX EEE")</b></code></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">The letters in the syntax represent the following:</p>
<ul style="list-style-type:disc">
<li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">X</span> is the main number.</li><li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">E</span> is the extension number.</li></ul>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">If a user enters the phone number with less digits than the mask represents, the excessive X and E letters will not appear in the document.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">The phone number is filled in with digits from left to right.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<ol style="list-style-type:decimal">
<li value="1" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>{ToString({$phone1}, "+7—XXX—XXX—XX—XX")}</b></code>&gt; +1-650-499-88-77.</li><li value="2" style="line-height: 1.20;"><code><b>{ToString({$phone1}, "X—XXX—XXX—XX—XX EEE")}</b></code>&gt; 1-650-499-88-77 159.</li><li value="3" style="line-height: 1.20;"><code><b>{ToString({$phone1}, "XX—XX—XX E")}</b></code>&gt; 99-88-77 3.</li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<h3 class="p_Heading3"><a id="date_time" class="hmanchor"></a><span class="f_Heading3">Date/Time</span></h3>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">You can add a date and time to you template, for example, to specify the delivery date in a supply contract.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Syntax: <code><b>ToString(param1: date/time, &lt;format:&gt;, &lt;locale: string&gt;)</b></code></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">This data type has three options: <span style="font-weight: bold;">Date/Time</span>, <span style="font-weight: bold;">Date</span>, and <span style="font-weight: bold;">Time</span>.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Without specifying any additional arguments, the document displays the current date and time.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal">Example</p>
<p class="p_Normal"><code><b>{ToString({$date1})} -></b></code></p>
<ol style="list-style-type:decimal">
<li value="1" class="p_Normal"><span style="font-weight: bold;">Date/Time</span>: <span style="font-size: 15px; font-family: Calibri,Vectora,'Droid Sans','Open Sans',Frutiger,sans-serif;">8/24/25 1:30:00 pm</span></li><li value="2" class="p_Normal"><span style="font-weight: bold;">Date</span>: <span style="font-size: 15px; font-family: Calibri,Vectora,'Droid Sans','Open Sans',Frutiger,sans-serif;">8/24/25 </span></li><li value="3" class="p_Normal"><span style="font-weight: bold;">Time</span>: <span style="font-size: 15px; font-family: Calibri,Vectora,'Droid Sans','Open Sans',Frutiger,sans-serif;">1:30:00 pm</span></li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">If you use the </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">short</span><span style="font-size: 15px; font-family: Inter;"> format in the function (</span><code><b>{ToString({$date1}, short)}</b></code><span style="font-size: 15px; font-family: Inter;">), seconds wont be indicated.</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal">Example</p>
<p class="p_Normal"><code><b>{ToString({$date1}, short)}-> </b></code></p>
<ol style="list-style-type:decimal">
<li value="1" class="p_Normal"><span style="font-weight: bold;">Date/Time</span>: <span style="font-size: 15px; font-family: Calibri,Vectora,'Droid Sans','Open Sans',Frutiger,sans-serif;">8/24/25 1:30 pm</span></li><li value="2" class="p_Normal"><span style="font-weight: bold;">Date</span>: <span style="font-size: 15px; font-family: Calibri,Vectora,'Droid Sans','Open Sans',Frutiger,sans-serif;">August 24, 2025</span></li><li value="3" class="p_Normal"><span style="font-weight: bold;">Time</span>: <span style="font-size: 15px; font-family: Calibri,Vectora,'Droid Sans','Open Sans',Frutiger,sans-serif;">1:30 pm</span></li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">When using the <code><b>long</b></code> format, the time will include seconds, and the date the month name:</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal">Example</p>
<p class="p_Normal"><code><b>{ToString({$date1}, long)}-> </b></code></p>
<ol style="list-style-type:decimal">
<li value="1" class="p_Normal"><span style="font-weight: bold;">Date/Time: </span>8/24/25 1:30:00 pm</li></ol>
<ol style="list-style-type:decimal" start="2">
<li value="2" class="p_Normal"><span style="font-weight: bold;">Date: </span>April 24, 2025</li></ol>
<ol style="list-style-type:decimal" start="3">
<li value="3" class="p_Normal"><span style="font-weight: bold;">Time:</span> 1:30:00 pm</li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal">You can specify a locale</p>
<ol style="list-style-type:decimal">
<li value="1" class="p_Normal">English: <code><b>en-US</b></code> or <code><b>en</b></code></li></ol>
<ol style="list-style-type:decimal" start="2">
<li value="2" class="p_Normal">Russian: <code><b>ru-RU</b></code> or <code><b>ru</b></code></li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal">Example</p>
<p class="p_Normal"><code><b>{ToString({$date1}, short, enUS)} -> </b></code> &nbsp;8/24/22 1:30: pm</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Please note that the <span style="font-weight: bold;">Date/Time</span> type takes into account the time zone of your company and shows the date accordingly. The <span style="font-weight: bold;">Date</span> and <span style="font-weight: bold;">Time</span> types show absolute values.</p>
<p class="p_Normal"><a class="dropdown-toggle" style="font-style: normal; font-weight: normal; color: #000000; background-color: transparent; text-decoration: none;" href="javascript:HMToggle('toggle','TOGGLE0186A3')">Example</a></p>
<div id="TOGGLE0186A3" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 14px 0 0 0;"><table style="border:none; border-spacing:0;">
<tr>
<td style="vertical-align:top; padding:0; border:none"><p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">&nbsp;<br />
To illustrate the use of the function in document templates, we created an agreement template and completed it with different variables and functions.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Then we <a href="360026720792.html" class="topiclink">added</a> it to a business process and bound the template variables to the process variables.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><img alt="sodt1" width="670" height="651" style="margin:0;width:670px;height:651px;border:none" src="sodt1.png"/></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">During process execution, users fill in the data, and once the process flow reaches the <a href="360026720792.html" class="topiclink">Generate from template</a> activity, the system automatically creates the agreement.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><img alt="8.PNG" title="8.PNG" width="812" height="582" style="margin:0;width:812px;height:582px;border:none" src="360031806772-8.png"/></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Click <a href="Supply_Agreement_Template.docx" class="filelink">here</a> to download the template used in this example.</p>
</td>
</tr>
</table>
</div>
<h2 class="p_Heading2"><a id="date_time_function" class="hmanchor"></a><span class="f_Heading2">DateTime() function</span></h2>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">The </span><code><b>DateTime()</b></code> <span style="font-size: 15px; font-family: Inter;">function is used to display date and time in any format. You can also specify the locale.</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 13px; font-family: Inter; color: #394149;">Syntax</span><span style="font-size: 15px; font-family: Inter;">: </span><code><b>DateTime(&lt;format:string&gt;,&lt;variable:date\time&gt;,&lt;locale&gt;)</b></code><span style="font-size: 15px; font-family: Inter;">.</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">For example, you can specify the date and time an app item was created.</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Example</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>{DateTime(&laquo;YYYYMMDD hh:mm:ss&raquo;,{$__createdAt},"ru_RU")}</b></code>&gt;<span style="font-size: 15px; font-family: Inter;"> 20250121 08:30:56</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal"><span style="font-size: 15px; font-family: Inter;">The template supports the following quotation marks: </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">&quot; &quot;, « », “ “, ” ”, ' '</span><span style="font-size: 15px; font-family: Inter;">.</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal">Examples</p>
<ol style="list-style-type:decimal">
<li value="1" class="p_Normal"><code><b>{DateTime('"DD" MMMM YYYY',{$__createdAt},"en_US")}</b></code>&gt; &quot;31&quot; August 2025.</li><li value="2" class="p_Normal"><code><b>{DateTime("&laquo;DD&raquo; MMMM YYYY",{$__createdAt},"en_US")}</b></code>&gt; «31» August 2025.</li><li value="3" class="p_Normal"><code><b>{DateTime(&laquo;'DD' MMMM YYYY&raquo;,{$__createdAt},"en_US")}</b></code>&gt; '31' August 2023.</li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal"><span style="font-weight: bold;"><a class="dropdown-toggle" style="font-style: normal; font-weight: bold; color: #000000; background-color: transparent; text-decoration: none;" href="javascript:HMToggle('toggle','TOGGLE0186A4')">Data formats</a></span></p>
<div id="TOGGLE0186A4" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; line-height: 1.0; page-break-inside: avoid; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="border:none; border-spacing:0;">
<tr>
<td style="vertical-align:top; padding:0; border:none"><p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 13px; color: #000000;">&nbsp;</span><br />
<span style="font-size: 15px; font-family: Inter; font-weight: bold;">Display options:</span></p>
<p class="p_Normal"><code><b>M</b></code><span style="font-size: 15px; font-family: Inter;">: month (1)</span></p>
<p class="p_Normal"><code><b>MM</b></code><span style="font-size: 15px; font-family: Inter;">: month (01)</span></p>
<p class="p_Normal"><code><b>MMM</b></code><span style="font-size: 15px; font-family: Inter;">: month (Jan)</span></p>
<p class="p_Normal"><code><b>MMMM</b></code><span style="font-size: 15px; font-family: Inter;">: (January)</span></p>
<p class="p_Normal"><code><b>D</b></code><span style="font-size: 15px; font-family: Inter;">: day (2)</span></p>
<p class="p_Normal"><code><b>DD</b></code><span style="font-size: 15px; font-family: Inter;">: day (02)</span></p>
<p class="p_Normal"><code><b>DDD</b></code><span style="font-size: 15px; font-family: Inter;">: day (Mon) &nbsp;</span></p>
<p class="p_Normal"><code><b>DDDD</b></code><span style="font-size: 15px; font-family: Inter;">: day (Monday)</span></p>
<p class="p_Normal"><code><b>YY</b></code><span style="font-size: 15px; font-family: Inter;">: year (06)</span></p>
<p class="p_Normal"><code><b>YYYY</b></code><span style="font-size: 15px; font-family: Inter;">: year (2006)</span></p>
<p class="p_Normal"><code><b>hh</b></code><span style="font-size: 15px; font-family: Inter;">: hours (15)</span></p>
<p class="p_Normal"><code><b>mm</b></code><span style="font-size: 15px; font-family: Inter;">: minutes (04)</span></p>
<p class="p_Normal"><code><b>ss</b></code><span style="font-size: 15px; font-family: Inter;">: seconds (05)</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Locales: &nbsp;</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">English (United States): </span><code><b>en_US</b></code></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">English (United Kingdom): </span><code><b>en_GB</b></code></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">German: </span><code><b>de_DE</b></code></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">French:</span><code><b>fr_FR</b></code></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Russian:</span><code><b>ru_RU</b></code></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Spanish: </span><code><b>es_ES</b></code></p>
</td>
</tr>
</table>
</div>
<h2 class="p_Heading2"><span class="f_Heading2">Now() function</span></h2>
<p class="p_Normal" style="line-height: 1.20; margin: 19px 0 0 0;">To add the current date and time with regard to your time zone, use the <code><b>Now</b></code> function.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Syntax: <code><b>Now(&lt;format: string&gt;, &lt;locale: string&gt;, &lt;timezone: string&gt;)</b></code></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">With each <code><b>format</b></code> value the date is displayed differently.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><a class="dropdown-toggle" style="font-style: normal; font-weight: normal; color: #000000; background-color: transparent; text-decoration: none;" href="javascript:HMToggle('toggle','TOGGLE0186A5')">Available format values</a></p>
<div id="TOGGLE0186A5" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 14px 0 0 0;"><table style="border:none; border-spacing:0;">
<tr>
<td style="vertical-align:top; padding:0; border:none"><ol style="list-style-type:decimal">
<li value="1" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>date</b></code>&gt; date (<span style="font-size: 15px; font-family: Calibri,Vectora,'Droid Sans','Open Sans',Frutiger,sans-serif;">8/12/25</span>).</li><li value="2" style="line-height: 1.20;"><code><b>time</b></code><span style="font-weight: bold;"> </span>&gt; 10:34 am.</li><li value="3" style="line-height: 1.20;"><code><b>timelong</b></code><span style="font-weight: bold;"> </span>&gt; 10:34:22 am.</li><li value="4" style="line-height: 1.20;"><code><b>datelong</b></code><span style="font-weight: bold;"> </span>&gt; April 13, 2025.</li><li value="5" style="line-height: 1.20;"><code><b>short</b></code> (default) —&gt; 8/12/25 10:52 am.</li></ol>
</td>
</tr>
</table>
</div>
<p class="p_Normal">English language <code><b>enUS</b></code> and Russian <code><b>ruRU</b></code> are available for <code><b>locale</b></code>.</p>
<p class="p_Normal"><code><b>timezone</b></code> is set in the format America/Toronto.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal">Examples of function syntax</p>
<ol style="list-style-type:decimal">
<li value="1" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>{Now(datelong, en-US)}</b></code>. Long date, en-US.</li><li value="2" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>{Now(datelong, en)}</b></code>. Long date en.</li><li value="3" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>{Now(datelong, en)}</b></code>. Date only en.</li><li value="4" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>{Now(datelong, ru-RU)}</b></code>. Long date ru-RU.</li></ol>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<h2 class="p_Heading2"><a id="count-function" class="hmanchor"></a><span class="f_Heading2">Count() function</span></h2>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">It gets the number of items passed in a variable of the <a href="360009707032.html#table" class="topiclink">Table</a> or <a href="360009707032.html#app" class="topiclink">App</a> type. It can be the number of rows in a table or records in a linked app.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Using this function, you can:</p>
<ul style="list-style-type:disc">
<li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;">Display the total number of items to estimate the amount of data.</li><li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;">Check if there are any data in the variable.</li><li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;">Display only the number of records instead of the table.</li><li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;">Specify the number of records above a table or before a list of data, etc.</li></ul>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Syntax: <code><b>{Count({$variable})}</b></code>.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Example</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>{Count({$report_table})}</b></code>. The number of rows in the report table.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>{Count({$app})}</b></code>. The number of items in the linked app.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">You can also use the function with a <a href="360027003711.html#for" class="topiclink">for loop</a>.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Example</p>
<ol style="list-style-type:decimal">
<li value="1" class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;">Show the number of rows of a table that is nested in the main report table:</li></ol>
<p class="p_CodeExample" style="white-space: normal; page-break-inside: avoid;"><span class="f_CodeExample">{for row in {$report_table}}</span><br />
<span class="f_CodeExample">Subrow count: {Count({$row.execution})}</span><br />
<span class="f_CodeExample">{end}</span></p>
<ol style="list-style-type:decimal" start="2">
<li value="2" class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;">Show the number of rows in the table, which is a property of the linked app:</li></ol>
<p class="p_CodeExample" style="white-space: normal; page-break-inside: avoid;"><span class="f_CodeExample">{for row in {$app}}</span><br />
<span class="f_CodeExample">Subrow count: {Count({$row.multi})}</span><br />
<span class="f_CodeExample">{end}</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Where:</p>
<ul style="list-style-type:disc">
<li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>app</b></code> is the field that contains the link to another app.</li><li class="p_Normal" style="line-height: 1.20; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><code><b>row.multi</b></code> is a field of the <span style="font-weight: bold;">Table</span> type in this app.</li></ul>
<h2 class="p_Heading2"><a id="if" class="hmanchor"></a><span class="f_Heading2">Conditions</span></h2>
<p style="line-height: 1.20; margin: 19px 0 0 0;"><span style="font-family: Inter;">You can display certain text in your document depending on conditions.</span></p>
<p style="line-height: 1.20; margin: 14px 0 0 0;"><span style="font-family: Inter;">A condition starts with</span><span style="font-size: 13px; font-family: Inter; color: #394149;"> </span><code><b>{if &lt;condition&gt;}</b></code><span style="font-size: 13px; font-family: Inter; color: #394149;"> </span><span style="font-family: Inter;">and ends with</span><span style="font-size: 13px; font-family: Inter; color: #394149;"> </span><code><b>{end}</b></code><span style="font-size: 13px; font-family: Inter; color: #394149;">. </span><code><b>&lt;condition&gt;</b></code> is any condition, for example, <code><b>{$variable_name} = "Yes"</b></code>.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Example 1</p>
<p style="line-height: 1.20; margin: 14px 0 0 0;"><code><b>{if {$user_name} = "Jacky Jones"} Best regards, Jacky Jones {end}</b></code><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;"> </span>&gt;<span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;"> </span>the function's condition checks the user's name. If the name coincides, the specified text is displayed.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Example 2</p>
<p class="p_Normal"><code><b>{if {$week.day} = "Friday"}</b></code></p>
<p class="p_Normal"><code><b>Bye, have a great weekend!</b></code></p>
<p class="p_Normal"><code><b>{else}</b></code></p>
<p class="p_Normal"><code><b>Bye!</b></code></p>
<p class="p_Normal"><code><b>{end}</b></code><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;"> </span>&gt;<span style="font-family: 'Courier New',Courier,monospace;"> </span>in this example, the current day of the week is checked. Depending on the day, one of the text options will be displayed.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;внимание</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">When using multiline conditions for </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">.xlsx</span><span style="font-size: 15px; font-family: Inter;"> files, you should not place additional text in the lines with the </span><code><b>{if &lt;condition&gt;}</b></code><span style="font-size: 15px; font-family: Inter;">, </span><code><b>{else}</b></code><span style="font-size: 15px; font-family: Inter;"> and </span><code><b>{end}</b></code><span style="font-size: 15px; font-family: Inter;"> operators. It will be removed during document generation.</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;внимание</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 19px 0 0 0;">Please note that for <a href="360009707032.html#yes-no-switch" class="topiclink">Yes/No switch</a> variables you need to specify options from the <span style="font-weight: bold;">Options</span> field. By default they are <span style="font-weight: bold;">Yes</span> and <span style="font-weight: bold;">No</span>.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">Начало&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">Example</p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><code><b>{if {$options} <> "No"} Example text {end}</b></code><span style="font-family: 'Courier New',Courier,monospace;"> </span>&gt;<span style="font-family: 'Courier New',Courier,monospace;"> </span>the text will be displayed only if the value is <code><b>Yes</b></code><span style="color: #394149;">.</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">Конец&nbsp;примера</span></p>
<p class="p_Normal">You can use a function to check if an app item's properties have values. If the field on the form is filled in, you can display its value.</p>
<p class="p_Normal">For<span style="color: #394149;"> <a href="360009707032.html#app" class="topiclink">App</a> or <a href="360009707032.html#file_type" class="topiclink">Files</a> properties, the condition function is applied only if there is one value, e.i. the </span><span style="font-weight: bold; color: #394149;">One</span><span style="color: #394149;"> option is selected for the property. If the </span><span style="font-weight: bold; color: #394149;">Many</span><span style="color: #394149;"> option is selected, use the</span><span style="color: #394149;"> <a href="360027003711.html#for" class="topiclink">for loop</a>.</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">Начало&nbsp;примера</span></p>
<p class="p_Normal">Example</p>
<p class="p_Normal"><code><b>{if {$document}} {$document} {end}</b></code>&gt; if a document is uploaded to a <span style="font-weight: bold;">Files</span> field, its name will be displayed in the generated file.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 19px 0 0 0;">In conditions you can use the following operators:</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><span style="font-weight: bold;">= </span>Equals</p>
<p class="p_Normal" style="line-height: 1.20;"><span style="font-weight: bold;">&lt;&gt;</span> Not equal to</p>
<p class="p_Normal" style="line-height: 1.20;"><span style="font-weight: bold;">&gt;</span> Greater than</p>
<p class="p_Normal" style="line-height: 1.20;"><span style="font-weight: bold;">&gt;= </span>Greater than or equal</p>
<p class="p_Normal" style="line-height: 1.20;"><span style="font-weight: bold;">&lt;</span> Less than</p>
<p class="p_Normal" style="line-height: 1.20;"><span style="font-weight: bold;">&lt;=</span> Less than or equal</p>
<p class="p_Normal" style="line-height: 1.20;">&nbsp;</p>
<h3 class="p_Heading3"><span class="f_Heading3">OR and AND logical operators</span></h3>
<p class="p_Normal">To create complex conditions, you can use the <code><b>OR</b></code> and <code><b>AND</b></code> operators, which allow you to specify multiple conditions as a single construction. </p>
<p class="p_Normal">When using <code><b>OR</b></code>, it is sufficient that at least one of the specified conditions is met. </p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal">Example </p>
<p class="p_Normal"><code><b>{if {$trip.location_type} = "Hotel" OR {$trip.location_type} = "Host apartment"}
{$business_trip_request.city}
{end}</b></code></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal">When using <code><b>AND</b></code>, you need all of the above conditions to be met. </p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal">Example </p>
<p class="p_Normal"><code><b>{if {$item.price} < 5000 AND {$item.isAvailable}}
{$item.name}
{end}</b></code></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal">Conditions with the logical operators <code><b>OR</b></code> and <code><b>AND</b></code> can be combined using parentheses. </p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal">Example</p>
<p class="p_Normal"><code><b>{if ({$business_trip_request.location_type} = "Hotel" OR {$ business_trip_request.location_type} = "Host apartment") AND ({$business_trip_request.price} < 5000)}
{$business_trip_request.city}
{end}</b></code></p>
<p class="p_Normal">The address will be specified if all the conditions are met.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<h2 class="p_Heading2"><a id="for" class="hmanchor"></a><span class="f_Heading2">For loop</span></h2>
<p class="p_Normal" style="line-height: 1.20; margin: 19px 0 0 0;">Use the <code><b>for</b></code> loop to display a list of items <span style="font-family: Inter;">in a document (for example, supplied goods listed one by one).</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 19px 0 0 0;"><span style="font-family: Inter;">The loop starts with the </span><code><b>{for &lt;expression&gt;}</b></code><span style="font-family: Inter;"> operator and ends with the </span><code><b>{end}</b></code><span style="font-family: Inter;"> operator. Here </span><code><b>&lt;expression&gt;</b></code><span style="font-family: Inter;"> is a field for a variable that will be defined as a list when <a href="360026936731.html" class="topiclink">the template is loaded</a> into the system and the </span><code><b>for</b></code><span style="font-family: Inter;"> loop is extracted from the document.</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p class="p_Normal">Example</p>
<p style="line-height: 1.20;"><code><b>{for fr in {$goods} }</b></code></p>
<p style="line-height: 1.20;"><code><b>ordered {$fr}</b></code></p>
<p style="line-height: 1.20;"><code><b>{end}</b></code></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">When you <a href="360026936731.html" class="topiclink">upload your template to the system</a>, <span style="font-family: Inter;">and the</span><span style="font-size: 13px; font-family: Inter; color: #394149;"> </span><code><b>for</b></code><span style="font-size: 13px; font-family: Inter; color: #394149;"> </span><span style="font-family: Inter;">loop is extracted, the field assigned for it is marked as a </span><span style="font-family: Inter; font-weight: bold;">list</span><span style="font-family: Inter;">.</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;"><img alt="sodt2" width="512" height="214" style="margin:0;width:512px;height:214px;border:none" src="sodt2.png"/></p>
<h3 class="p_Heading3"><span class="f_Heading3">For loop in apps</span></h3>
<p style="line-height: 1.20; margin: 19px 0 0 0;"><span style="font-family: Inter;">You can use the</span><span style="font-size: 13px; font-family: Inter; color: #394149;"> </span><code><b>for</b></code><span style="font-family: Inter;"> loop to display display app data. You can specify field names with or without the </span><code><b>data</b></code><span style="font-family: Inter;"> prefix, such as </span><code><b>{$data.appListField}</b></code><span style="font-family: Inter;"> or </span><code><b>{$appListField}</b></code><span style="font-family: Inter;">.</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p style="line-height: 1.20; background: #f7f7f7; margin: 19px 0 0 0;"><span style="font-family: Inter;">Example</span></p>
<p style="line-height: 1.20; background: #f7f7f7; margin: 5px 0 0 0;"><code><b>{for fr in {$appListField} }</b></code></p>
<p style="line-height: 1.20; background: #f7f7f7; margin: 5px 0 0 0;"><code><b>Contract {$fr} with {$fr.__name} for {$fr.money}</b></code></p>
<p style="line-height: 1.20; background: #f7f7f7; margin: 5px 0 0 0;"><code><b>{end}</b></code></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<p style="line-height: 1.20; margin: 19px 0 0 0;"><span style="font-family: Inter;">A similar loop allows you to write data to a table.</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;внимание</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">For </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">.xlsx</span><span style="font-size: 15px; font-family: Inter;"> files, additional text should not be placed in lines with the </span><code><b>{for &lt;expression&gt;}</b></code><span style="font-size: 15px; font-family: Inter;"> and </span><code><b>{end}</b></code><span style="font-size: 15px; font-family: Inter;"> operators. It will be removed during document generation, except for text in <a href="360027003711.html#merged-cells" class="topiclink">merged cells</a>.</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;внимание</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;примера</span></p>
<p style="line-height: 1.20; background: #f7f7f7; margin: 19px 0 0 0;"><span style="font-family: Inter;">Example</span></p>
<p style="line-height: 1.20; background: #f7f7f7; margin: 5px 0 0 0;"><code><b>{for fr in {$appListField} }</b></code></p>
<div style="text-align: left; text-indent: 0; line-height: 1.80; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="border:none; border-spacing:0; border-collapse:collapse;">
<tr>
<td style="vertical-align:top; width:138px; background-color:#FFFFFF; padding:1px; border:solid thin #000000;"><p style="line-height: 1.20; margin: 0 0 11px 0;"><code><b>{$fr}</b></code></p>
</td>
<td style="vertical-align:top; width:138px; background-color:#FFFFFF; padding:1px; border:solid thin #000000;"><p style="line-height: 1.20; margin: 0 0 11px 0;"><code><b>{$fr.__name}</b></code></p>
</td>
<td style="vertical-align:top; width:138px; background-color:#FFFFFF; padding:1px; border:solid thin #000000;"><p style="line-height: 1.20; margin: 0 0 11px 0;"><code><b>{$fr.money}</code></b></p>
</td>
</tr>
</table>
</div>
<p style="line-height: 1.20; background: #f7f7f7; margin: 5px 0 0 0;"><code><b>{end}</b></code></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;примера</span></p>
<h3 class="p_Heading3"><a id="for_tables" class="hmanchor"></a><span class="f_Heading3">For loop in tables</span></h3>
<p style="line-height: 1.20; margin: 7px 0 7px 0;"><span style="font-family: Inter;">You can display data in the field as a list and as a table. To let the loop work correctly, when you <a href="360026936731.html#add_shablon" class="topiclink">add a template</a> to the system, specify the <a href="360009707032.html#table" class="topiclink">Table</a> data type for a variable in the loop.</span></p>
<p style="line-height: 1.20; margin: 19px 0 0 0;"><span style="font-family: Inter;">If you need to extract data from a <a href="360010201779.html" class="topiclink">table</a> into a document, for example, a list of goods with their quantity and cost filled in during order processing, you can use a template in </span><span style="font-family: Inter; font-weight: bold;">.xlsx</span><span style="font-family: Inter;"> format.</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">When configuring the template, use a <code><b>for</b></code> loop and specify the process variable that stores the table data.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">When creating a template in a <span style="font-weight: bold;">.xlsx</span> file, the <code><b>for</b></code> and <code><b>end</b></code> commands must be in the first column of the table, otherwise the entered text will not be displayed correctly. Next, you need to specify the codes of the corresponding app fields in the template.</p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">In the <code><b>item_price</b></code> function, this is the code for the <span style="font-weight: bold;">Price</span> field. In the template, specify it with the <code><b>row.data</b></code> or <code><b>row</b></code> prefix. For example, <code><b>{$row.data.item_price}</b></code> or <code><b>{$row.item_price}</b></code>. The prefix refers to the item in a loop and allows as many rows to be filled in the document as are filled in the table in BRIX.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;внимание</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;">In table rows with the <code><b>{for &lt;expression&gt;}</b></code> and <code><b>{end}</b></code> operators, additional text should not be placed. It will be removed during document generation, except for text in <a href="360027003711.html#merged-cells" class="topiclink">merged cells</a>.</p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;внимание</span></p>
<p class="p_Normal" style="line-height: 1.20; margin: 14px 0 0 0;">A <span style="font-weight: bold;">.xlsx</span> document template for a table that contains an item, its cost, quantity, and total amount payable may look like this:</p>
<p class="p_Normal"><img alt="01.PNG" title="01.PNG" width="925" height="160" style="margin:0;width:925px;height:160px;border:none" src="360012748940-01.png"/></p>
<p class="p_Normal">You can also add an <code><b>if</b></code> condition to the <code><b>for</b></code> loop. You can see an example in the <a href="ready-made-sheets-settings.html#app-file-template" class="topiclink">Templates for approval sheets and lists of informed users</a> article. Please note that for <span style="font-weight: bold;">.xlsx</span> files, you should not place any text in rows with the <code><b>{for &lt;expression&gt;}</b></code> and <code><b>{end}</b></code> operators, as this text is deleted during generation. The exception is vertically merged cells.</p>
<h3 class="p_Heading3"><span class="f_Heading3">Template for a table in a .docx file</span></h3>
<p class="p_Normal">To generate a table from a template in a <span style="font-weight: bold;">.docx</span> file:</p>
<ol style="list-style-type:upper-roman">
<li value="1" class="p_Normal">Separate the first row of the table using the <span style="font-weight: bold;">Split table</span> option.</li><li value="2" class="p_Normal">In the empty row that appears, declare a <code><b>for</b></code> loop.</li><li value="3" class="p_Normal">Configure the template in the table by specifying variables from the business process context.</li><li value="4" class="p_Normal">Under the table, close the loop with the <code><b>end</b></code> command.</li></ol>
<p class="p_Normal">For example, the template for a table in a document might look like this:</p>
<p class="p_Normal"><img alt="template_table_doc" width="736" height="140" style="margin:0;width:736px;height:140px;border:none" src="template_table_doc.png"/></p>
<h3 class="p_Heading3"><span class="f_Heading3">Nested tables</span></h3>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">The </span><code><b>for</b></code><span style="font-size: 15px; font-family: Inter;"> loop can be used to create a nested table. When referencing columns of a nested table, instead of prefix </span><code><b>row.data</b></code><span style="font-size: 15px; font-family: Inter;"> or </span><code><b>row</b></code><span style="font-size: 15px; font-family: Inter;"> use a different </span>prefix — <code><b>subrow.data</b></code><span style="font-size: 15px; font-family: Inter;"> or </span><code><b>subrow</b></code><span style="font-size: 15px; font-family: Inter;">.</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><img alt="for-brix-00" width="493" height="162" style="margin:0;width:493px;height:162px;border:none" src="for-brix-00.png"/></p>
<p class="p_Normal"><a id="merged-cells" class="hmanchor"></a>Please note that in rows with operators <code><b>{for &lt;expression&gt;}</b></code> and <code><b>{end}</b></code>, you cannot place any other text as it will be deleted during generation. Cells merged vertically are an exception. For example, when generating a document from such a templte, the value of variable <code><b>{$row.author}</b></code> will be shown in the table:</p>
<p class="p_Normal"><img alt="for-brix-01" width="707" height="162" style="margin:0;width:707px;height:162px;border:none" src="for-brix-01.png"/></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 13px; color: #000000;">&nbsp;</span></p>
<h3 class="p_Heading3"><span class="f_Heading3">Show index number in tables</span></h3>
<p class="p_Normal">You can use <code><b>for</b></code> loop to add a row's index number to the table template.<span style="font-size: 15px; color: #394149;"> </span>This is done via the<span style="font-size: 15px; color: #394149;"> </span><code><b>row.data</b></code><span style="font-size: 15px; color: #394149;"> or </span><code><b>row</b></code> prefix and the<span style="font-size: 15px; color: #394149;"> </span><code><b>__index</b></code><span style="font-size: 15px; color: #394149;"> </span>system property. For example, <code><b>{$row.__index}</b></code>. </p>
<p style="line-height: 1.20; margin: 16px 0 0 0;">A table template with the row number, product name and product price may look like this:</p>
<p class="p_Normal" style="margin: 16px 0 0 0;"><img alt="table-index" title="table-index" width="521" height="169" style="margin:0;width:521px;height:169px;border:none" src="table-index.png"/></p>
<div class="bottom-nav">
<a id="prev-link" class="topic__navi_prev" href="360026936731.html">
<span class="bottom-nav__arrow bottom-nav__arrow--prev"></span> <span
class="bottom-nav__link">360026936731.html</span>
</a>
<a id="next-link" class="topic__navi_next" href="another-template-syntax-functions.html">
<span class="bottom-nav__link">another-template-syntax-functions.html</span> <span
class="bottom-nav__arrow bottom-nav__arrow--next"></span>
</a>
</div>
<!-- добавляет на страницу строку блок Была ли статья полезной? -->
<div class="feedback" id="feedback"><div class="feedback-help"><span><b>Was this helpful?</b></span><form action="" method="POST" class="feedback-form" id="feedback-form"><div class="feedback__popup feedback__popup-response" id="feedback__popup_thx" style="display: none;">Thanks for your feedback!</div><div class="feedback__popup" id="feedback__popup_why" style="display: none;"><div class="feedback__popup-header">Please specify why:</div><input type="radio" name="category" id="bad_recommendation" value="bad_recommendation"><label for="bad_recommendation">Recommendations did not help me</label><input type="radio" name="category" id="difficult_text" value="difficult_text"><label for="difficult_text">Article is hard to understand</label><input type="radio" name="category" id="no_answer" value="no_answer"><label for="no_answer">Didn`t answer my question</label><input type="radio" name="category" id="bad_header" value="bad_header"><label for="bad_header">Content does not match the topic</label><input type="radio" name="category" id="other_reason" value="other_reason"><label for="other_reason">Other</label></div><div class="feedback__popup" id="feedback__popup-other" style="display: none;"><div class="feedback__popup-header">How we can improve it?</div><textarea class="feedback__textarea" name="other" id=""></textarea><input type="submit" class="feedback__other-btn" value="Submit"></div><div class="feedback-form__btn-group"><input type="radio" name="useful" id="feedback__useful_yes" value="true"><label for="feedback__useful_yes"><img src="like.svg" class="small-img" alt="like"><spanclass="feedback-form__btn-group_yes-btn">Yes</spanclass="feedback-form__btn-group_yes-btn"></label><input type="radio" name="useful" id="feedback__useful_no" value="false"><label for="feedback__useful_no"><img src="dislike.svg" class="small-img" alt="dislike"><spanclass="feedback-form__btn-group_no-btn">No</spanclass="feedback-form__btn-group_no-btn"></label></div><select name="category"><option disabled="">Please specify why</option><option value="bad_recommendation" selected="">Recommendations did not help me</option><option value="difficult_text">Article is hard to understand</option><option value="no_answer">Didn`t answer my question</option><option value="bad_header">Content does not match the topic</option><option value="other_reason">Other</option></select><input type="submit"></form></div><div class="found_typo"><p style="margin: 0px; margin-top: 16px !important;"><span><b>Found a typo?</b></span> Select it and press <i>Ctrl+Enter</i> to send us feedback</p></div></div>
</section>
</div>
<aside class="article__sidebar" style="display:none">
<input type="checkbox" />
<div class="article__arrow"></div>
<div class="table-of-contents elma365-right" id="toc2Content">
<h3 class="h3-toc">In this topic</h3>
<nav id="toc2"></nav>
</div>
</aside>
</div>
</article>
</main>
<footer class="footer">
<div class="footer-container">
<div class="footer-mobile">
<ul class="footer-mobile__list"><li><a href="https://brix365.com/en/" target="_blank">BRIX</a></li><li><a href="https://tssdk.brix365.com/en/latest/" target="_blank">SDK</a></li><li><a href="https://api.brix365.com/en/" target="_blank">API</a></li></ul><ul class="footer-mobile__list"><li><a href="https://brix365.com/en/help/platform/get-trial.html">Platform</a></li><li><a href="https://brix365.com/en/help/ecm/ecm-functions.html">ECM</a></li><li><a href="https://brix365.com/en/help/service/service-functions.html">Service</a></li><li><a href="https://brix365.com/en/help/projects/projects-functions.html">Projects</a></li></ul>
</div>
<div class="footer-wrap">
<div><span class="mobile-question-popup">Send feedback</span><form method="POST" action class="question__popup question-xs" id="question__popup"><div class="question-wrap"><span class="close"></span><span class="title">Ask a question</span><label for="help_question" style="display: none;"></label><textarea name="help_question" id="help_question"></textarea><input type="submit" value="Send"></div></form><div class="hidden fade-in question-success-xs">Sent</div></div>
<div class="footer-flex-b">
<span class="footer-copy">&copy; 2025 BRIX</span>
<ul class="footer-list">
<li class="footer-item">
<a href="#" class="arrow-top" style="display: block;"></a>
</li>
</ul>
</div>
</div>
</div>
</footer>
<iframe name="hmnavigation" style="display:none!important"></iframe>
<script src="./jquery-ui.js"></script>
<!--script src="//cdn.jsdelivr.net/npm/featherlight@1.7.14/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script-->
<script src="./jquery.tocify.min.js"></script>
<script src="./TypoReporter.min.js"></script>
<script src="./google-search.js"></script>
<script src="./main.js"></script>
<script type="text/javascript">
HMInitToggle('TOGGLE0186A1','hm.type','dropdown','hm.state','0');
HMInitToggle('TOGGLE0186A2','hm.type','dropdown','hm.state','0');
HMInitToggle('TOGGLE0186A3','hm.type','dropdown','hm.state','0');
HMInitToggle('TOGGLE0186A4','hm.type','dropdown','hm.state','0');
HMInitToggle('TOGGLE0186A5','hm.type','dropdown','hm.state','0');
</script>
</body>
</html>