# Formatting

## Шаблон Formatting <a href="#template" id="template"></a>

```xml
<Formatting>
  <BackColor Name="">
    <Color></Color>
    <ColorFromColumnValue></ColorFromColumnValue>
    <Columns>
      <Column Name="" />
      <Column Name="" />
    </Columns>
    <Expression></Expression>
    <Items>
      <Item></Item>
      <Item></Item>
    </Items>
  </BackColor>
  <ForeColor Name="">
    <Color></Color>
    <ColorFromColumnValue></ColorFromColumnValue>
    <Columns>
      <Column Name="" />
      <Column Name="" />
    </Columns>
    <Expression></Expression>
    <Items>
      <Item></Item>
      <Item></Item>
    </Items>
  </ForeColor>
  <FontStyle Name="">
    <Columns>
      <Column Name="" />
      <Column Name="" />
    </Columns>
    <Expression></Expression>
    <Items>
      <Item></Item>
      <Item></Item>
    </Items>
  </FontStyle>
  <Alignment>
    <Value>MiddleCenter</Value>
    <Columns>
      <Column Name="ColumnName1" />
    </Columns>
    <Expression>ColumnName3 > {0}</Expression>
    <Items>
      <Item>10</Item>
    </Items>
  </Alignment>
  <Alignment Value="MiddleRight">
    <Columns>
      <Column Name="ColumnName2" />
    </Columns>
    <Expression>ColumnName4</Expression>
  </Alignment>
</Formatting>
```

## Тэги Formatting <a href="#specific-tags" id="specific-tags"></a>

### BackColor <a href="#back_color" id="back_color"></a>

Условный цвет фона ячейки.

Необязательный тэг. Описание вложенных тэгов по [ссылке](/workflow-forms-syntax/workflow_forms/objects/databasetable/formatting/back_color.md).

Необязательный атрибут `Name` ожидает имя одного из цветов, описанных на форме или описание цвета в формате HTML (#rrggbb).

```xml
<BackColor Name="BackColor">
  <Columns>
    <Column Name="ColumnName1" />
    <Column Name="ColumnName2" />
  </Columns>
  <Expression>ColumnName3 > {0} * {1}</Expression>
  <Items>
    <Item>10</Item>
    <Item>20</Item>
  </Items>
</BackColor>
```

### ForeColor <a href="#fore_color" id="fore_color"></a>

Условный цвет шрифта ячейки.

Необязательный тэг. Описание вложенных тэгов по [ссылке](/workflow-forms-syntax/workflow_forms/objects/databasetable/formatting/fore_color.md).

Необязательный атрибут `Name` ожидает имя одного из цветов, описанных на форме или описание цвета в формате HTML (#rrggbb).

```xml
<ForeColor Name="ForeColor">
  <Columns>
    <Column Name="ColumnName1" />
    <Column Name="ColumnName2" />
  </Columns>
  <Expression>ColumnName3 > {0} * {1}</Expression>
  <Items>
    <Item>10</Item>
    <Item>20</Item>
  </Items>
</ForeColor>
```

### FontStyle <a href="#font_style" id="font_style"></a>

Условный стиль шрифта ячейки.

Необязательный тэг. Описание вложенных тэгов по [ссылке](/workflow-forms-syntax/workflow_forms/objects/databasetable/formatting/font_style.md).

Обязательный атрибут `Name` ожидает имя одного из стилей шрифтов, описанных на форме.

```xml
<FontStyle Name="FontStyle">
  <Columns>
    <Column Name="ColumnName1" />
    <Column Name="ColumnName2" />
  </Columns>
  <Expression>ColumnName3 > {0} * {1}</Expression>
  <Items>
    <Item>10</Item>
    <Item>20</Item>
  </Items>
</FontStyle>
```

### Alignment <a href="#alignment" id="alignment"></a>

Условное положение содержимого ячейки.

Необязательный тэг. Описание вложенных тэгов по [ссылке](/workflow-forms-syntax/workflow_forms/objects/databasetable/formatting/alignment.md).

Необязательный атрибут `Value` ожидает название одного из типов положения:

<table data-header-hidden><thead><tr><th width="223.76049129989767" align="center"></th><th width="437.3333333333333"></th></tr></thead><tbody><tr><td align="center">TopLeft</td><td>Слева сверху</td></tr><tr><td align="center">TopCenter</td><td>По центру сверху</td></tr><tr><td align="center">TopRight</td><td>Справа сверху</td></tr><tr><td align="center">MiddleLeft</td><td>Слева посередине</td></tr><tr><td align="center">MiddleCenter</td><td>По центру посередине</td></tr><tr><td align="center">MiddleRight</td><td>Справа посередине</td></tr><tr><td align="center">BottomLeft</td><td>Слева снизу</td></tr><tr><td align="center">BottomCenter</td><td>По центру снизу</td></tr><tr><td align="center">BottomRight</td><td>Справа снизу</td></tr></tbody></table>

```xml
<Alignment Value="MiddleRight">
  <Columns>
    <Column Name="ColumnName2" />
  </Columns>
  <Expression>ColumnName3 > {0}</Expression>
  <Items>
    <Item>10</Item>
  </Items>
</Alignment>
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wfsys.gitbook.io/workflow-forms-syntax/workflow_forms/objects/databasetable/formatting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
