Skip to content

SRS Column

Optional XML element with column additional formatting xpath = srs/def/itm[@model='column']

Attributes

Required

  • name, required

Optional

  • lg - (true/false) show/hide column on desktop
  • sm - (true/false) show/hide column on mobile
  • ex - (true/false) show/hide column on export for example excel
  • title title for name example title="{invoiceFullNR} {printoutName}"
  • value URL /item/{anycolumnname}/{anycolumnname}?app_name=[[app_name]]&columnx1={columnx1} ,
    • supported variables [[app_name]] [[kv.v.*]]
    • Warning & need to be replaced with &
  • label
  • required true/false
  • type see section Column type
  • acl column permission
  • css custom class - see xd.css https://kotynia.github.io/xd-css/
  • width column width
  • opts
    • uiinline - render inline component in row
    • uianonymize - when role uianonymize assigned sensitive information are removed
    • uisum - total footer in table

Column type

Autodiscover

List of autodiscover types from database schema

  • tguid
  • tdate - Date DD/MM/YYYY, with utc offset
  • tbool Bool
  • tinteger example 2 (Integer)
  • tdecimal example 2.02 (Decimal)
  • tstring

UI types

  • tdatetime - Date with time without utc offset DD/MM/YYYY HH:mm
  • tinput_number - input number
  • tinput_text - text
  • tinput_bool - checkbox number
  • tlink - link
    • text value = url
    • if panull text value not link
  • tlink_frame - link , when ctrl key then modal
    • text value = url
    • if panull text value not link
  • tlink_modal - tlink_frame with default modal
  • tlink_tag - build tag link with color based on text
  • tlink_icon - internal paanda client link with icon font awesome 4 icon
  • tlink_download - dedicated for files download
  • tlink_icon_download_pdf - dedicated for download files pdf.
    • The downloaded file name can be set by column.title property.
    • only work for icons! Make sure you passed it in column.css
    • example use: <itm model="column" name="action" label="Drukuj" type="tlink_icon_download_pdf" title="{invoiceFullNR} {printoutName}" css="fa fa-print">{action}</itm>
  • turl_blank - external link in new window
  • turl_post - send standard javascript object to url
    • text value = url
  • tcolor_progress
  • turl_progress
  • tformat_bytes - Human readable size input bytes
  • tformat_k - Human readable size for large numbers, REturn 10K, 20M
  • ttag - build tag list with color based on text
  • tstring_multi -- multiline Text with Line breaks similar to HTML pre tag
  • timg - image
  • tmail email separated by space

server side transformation

  • tcolor, render hexadecimal color code based on text
  • tbase64 - server side base64 datastore image render return bytes
    • support : "jpg", "png", "jpeg", "apng", "webp", "gif" with optimization, optional w,h,o - width,height,option, default w=400
  • tbarcode - server side barcode returns bytes , can use width attribute and opts="label" to display label
  • tqrcode - server side qrcode returns bytes
  • tmarkdown, renders markdown
  • tjson, renders xml to json s

Special column names

  • pa_background Hexadecimal color for background
  • pa_color Hexadecimal color for text

Examples

tjson

  • <Array will force array output
XML
1
2
3
4
5
6
7
8
<ArrayOfFile>
  <file>
    <name>image001.png</name>
    <bytes>32674</bytes>
    <hash>550dc3bf-a1d2-e39b-58b1-56883453c2f0</hash>
    <extension>.png</extension>
  </file>
</ArrayOfFile>

timg images

Important notice ampersand (&) must be replace with & in attributes

XML
1
2
3
4
5
6
7
<itm model="column" name="logo" type="timg">/api/files/26EFEED6-CDEF-E911-80DA-9C8E994DC647.png</itm>
<itm model="column" name="logo" type="timg">/client/images/logo.png?w=150</itm>
<itm model="column" type="timg" name="mail_to_avatar">/account/avatar/{mail_to_avatar}</itm>
<!--Example BARCODE-->
<itm model="column" type="timg" name="qr" width="100">/api/core/system/barcode?code={qr}&amp;type=code128</itm>
<!--Example QRCODE-->
<itm model="column" type="timg" name="qr" width="100">/api/core/system/qrcode?code={qr}</itm>

turl_blank external linking

XML
1
2
3
4
<!--Redirect to external page-->
<itm model="column" type="turl_blank" name="test1">http://test.com/test?commisionID={commisionID}</itm>
<itm model="column" type="turl_blank" name="email">mailto:{email}</itm>
<itm model="column" type="turl_blank" name="phone">tel:{phone}</itm>

tstring_multi Text with Line breaks similar to HTML pre tag

SQL Server Example:

SQL
SELECT 'Hello' + CHAR(13) + CHAR(10) + 'World'

pa_background color for background

Used with 'var(--xd-green1)'

XML
<itm model="command" name="saleInvoiceDateSummary"><![CDATA[
        select
            ROUND(sum(sysnetValue), 2) value,

            'RAZEM'  invoiceCategory,
'var(--xd-green1)' pa_background
        FROM
            saleInvoiceSummary 
]]>
</itm>

Used with hex value (e.g. '#112233') or column name from query (e.g.column_hex_example)

XML
<itm model="command" name="saleInvoiceDateSummary"><![CDATA[
        select
            ROUND(sum(sysnetValue), 2) value,

            'RAZEM'  invoiceCategory,
      '#112233' pa_background 
        FROM
            saleInvoiceSummary 
]]>
</itm>