Column
Optional XML element that defines a column and its UI options.
| XML | |
|---|---|
In the UI, timg is rendered as an <img> tag.
Attributes
Required
name, required
Optional
lg- (true/false) show/hide column on desktopsm- (true/false) show/hide column on mobileex- (true/false) show/hide column on export (for example: Excel)title- title template, for exampletitle="{invoiceFullNR} {printoutName}"text- URL/template, for example/item/{anycolumnname}/{anycolumnname}?app_name=[[app_name]]&columnx1={columnx1}- server-side variables
[[variable]]are available, see server side variables - IMPORTANT: server-side variables are replaced with an empty string if not found
- Warning:
&must be written as&in XML attributes
- server-side variables
label- label template- server-side variables
[[variable]]are available, see server side variables - IMPORTANT: server-side variables are replaced with an empty string if not found
- server-side variables
requiredtrue/falsetypesee sectionColumn typeaclcolumn permissioncsscustom class (see xd.css https://kotynia.github.io/xd-css/)widthcolumn widthoptsuiinline- render inline component in rowuianonymize- when theuianonymizerole is assigned, sensitive information is removeduisum- total in table footerglobal-on- information: column configuration was inherited from global configurationglobal.xmllg-auto- setlg=falsewhen the column value is emptylg-true,lg-false- override desktop visibility; can be set through Business logic insrssetupsm-true,sm-false- override mobile visibility; can be set through Business logic insrssetupdttranslation- translate values ifsrstranslationdata exists
Column type
Autodiscover
List of autodiscover types from database schema
tguidtdate- date. On the client, the UTC offset is applied to convert it to local timetbool- Booleantinteger- Integer, example 2tdecimal- Decimal, example 2.02tstring
UI types
tdatetime- date with timeDD/MM/YYYY HH:mm. On the client, the UTC offset is applied to convert it to local timetinput_number- input numbertinput_text- texttinput_bool- checkboxtlink- link- text value = URL
- if the value is
panull, render plain text (no link)
tlink_frame- link; Ctrl+click opens a modal- text value = URL
- if the value is
panull, render plain text (no link)
tlink_modal- tlink_frame with default modaltlink_tag- build tag link with color based on texttlink_icon- internal link with a Font Awesome 4 icon- text value = URL
- column.css - Font Awesome 4 class https://fontawesome.com/v4.7.0/icons/, example
fa fa-bar-chart
tlink_download- dedicated for files downloadtlink_icon_download_pdf- dedicated for downloading PDF files- the downloaded file name can be set by
column.title - only works for icons; make sure you pass an icon class in
column.css - example:
<itm model="column" name="action" label="Drukuj" type="tlink_icon_download_pdf" title="{invoiceFullNR} {printoutName}" css="fa fa-print">{action}</itm>
- the downloaded file name can be set by
tlink_post- send a JavaScript object to a URLturl_blank- external link in new windowtcolor_progressturl_progresstformat_bytes- Human readable size input bytestformat_k- human readable size for large numbers, returns e.g.10K,20Mttag- build tag list with color based on textttagmenu- build tag list with color based on text + extra menu on toptstring_multi- multiline text with line breaks similar to HTMLpretagtstring_2lines- 2 lines of texttimg- imagetmail- email addresses separated by spaces
server side transformation
tcolor, render hexadecimal color code based on texttbase64- server-side base64 datastore image renderer (returns bytes)- supported: "jpg", "png", "jpeg", "apng", "webp", "gif" with optimization; optional
w,h,o(width, height, option); defaultw=400 - example item
00000000-0000-0000-0000-000000000000.png?w=400
- supported: "jpg", "png", "jpeg", "apng", "webp", "gif" with optimization; optional
tbarcode- server-side barcode (returns bytes); can usewidthandopts="label"to display a labeltqrcode- server-side QR code (returns bytes)tmarkdown- renders markdown to HTMLtjson- renders XML to JSON- properties starting with
<Arraywill convert to an array - properties mentioned in value (csv) will convert to an array, for example
<itm model="column" type="tjson" name="xml">xmlField</itm>
- properties starting with
Special column names
pa_backgroundHexadecimal color for backgroundpa_colorHexadecimal color for text
Examples
tlink tlink_modal tlink_frame,tlink_post
All link types require a URL as the element value (text/CDATA). In the URL you can use:
- row data, for example
{planid} - server-side variables
[[variable]]are available, see server side variables - client-side parameters are available as
{parameter}, which will be replaced with (in order of priority):- client side parameters passed to the srs
- query string parameters
- Warning:
&must be written as&in XML attributes (or use CDATA)
tjson - Arrays Examples
By default, if a single element is provided it will be returned as an object. In some cases you may want to force an array, for example when you want the output to always be an array (even if it has a single item).
Output
There are 2 options to force an element to be an array.
- force array output for a single item by starting the element name with
<Array(otherwise it will return an object) - properties mentioned in the value (csv) will convert to an array, for example
<itm model="column" type="tjson" name="xml">xmlField,xmlField2</itm>
Example 1 - force array output <Array
| XML | |
|---|---|
| JSON | |
|---|---|
Example 2 - force array output for specific elements <itm model="column" type="tjson" name="xml">file</itm>
Example 3 - self closing tag
| XML | |
|---|---|
OUT
| JSON | |
|---|---|
timg images
Important: ampersand (
&) must be written as&in attributes, or you can use a CDATA section.
turl_blank external linking
| XML | |
|---|---|
tstring_multi Text with Line breaks similar to HTML pre tag
SQL Server Example:
| SQL | |
|---|---|
pa_background color for background
Used with 'var(--xd-green1)'
| XML | |
|---|---|
Used with hex value (e.g. '#112233') or column name from query (e.g.column_hex_example)