This section explains how to create a channel which users can subsequently add to their desktops.

# 1 Channels

## 1.1 SQL Statements

The data displayed in the channel is configured via the SQL Statement text area box. The statement may consist of a SQL query or an XSQL-Script returning a result set.

An SQL statement might be written in XSQL, SQL Native, or might be an XSQL script call.

Each SQL statement may include the following injections:

1. $COLUMN: This injection allows the user to create a column that will change automatically from the desktop channel. Its possible values will be defined in the "SQL Column" box. 2.$0: This injection allows the user to configure and filter their channels by selecting values.

The list of values will be injected in the $0 clause. Therefore, when value filters are enabled, the WHERE clause must follow this format: [name_of_column] IN$0.

The range of values which the user can choose from is configured by adding symbols to the channel in the "Data Selection" box. Using Channel Options on the desktop, and Edit symbols, the user will be able to select the row which wishes to filter by.

3. $METAQCOND: This injection allows the user to filter the channel. Permitted filters will be defined in the "Metaquery" box. ## 1.2 SQL Column In this section the user can define a variable column which will change dynamically from desktop. One column must be selected at all times, so one of the columns should be defined as default. If no column is defined as default, when the channel is loaded, it will appear with an empty column. To implement this variable column properly, the string$COLUMN must first be written around the columns conditions in the SQL Query. The program will replace that string for the desired column.

Column properties will be searched at the column definition of "table + real column". Otherwise, if it is not defined, the system will search the properties at "table + column".

## 1.3 Metaquery

Users are allowed to apply certain preconfigured conditions to a channel. In the MetaQuery, a list of SQL conditions can be programmed. The conditions will be injected in a $METACOND clause that must be defined in the SQL statement. If no filter is selected, the$METACOND clause will be replaced by "1 = 1".

## 1.4 Identification

The Name of the channel is mandatory. Tipically it is used conventional syntax, with lowercase and underscore between separate words. As usual, it is preferable to give a meaningful name to the channel.

The Description field allows a more detailed description without any pre-established format. Although the program assigns a random name if this field is empty, it is important to note that this description will be necessary to select the channel if you want to add it on the desktop. That's why it is recommended to provide a meaningful description too.

# 2 Output Fields

The Output Fields tab defines how channel columns appear in the Portal.

Output fields set the formatting options which will be applied to each column when rendered in a channel. For example, users can apply labels, totals, grouping, colors, chart renderers, etc. Some other options are applied via standard column attributes.

To access the Attributes options, use the drop-menu Dictionary / Physical / Attributes.

## 2.1 Palette / Table Colorizer

The palette feature allows us to use the Table Colorizer feature to parameterize the way of colorizing grid cells depending on its content, generally to emphasize the importance of a cell among a group of cells.

Table Colorizer are mainly focused on the colorization of grids.

Its use is interesting when:

• The dataset contains numeric values to be classified
• The dataset contains discrete values (numbers or strings) from which we want to obtain the frequency of appearance

The best thing of Color Palette is that it's very easy to colorize the grid, just by indicating a palette of colors and one of the defined algorithms we have enough. At the same time, it can be added complexity to the colorizer with the use of ranges.

There are two methods to define the way to colorize the table:

### 2.1.1 Color palette

If the method defined in a color rule definition is 'Simple distribution', 'Quartiles distribution' or 'Repetitions'. To define the colors that will be use we need to define the palette with:

 wic_jdic_color_rule_def wic_jdic_color_palette

### 2.1.2 Table colorizer ranges

The color of the cells will be selected with a series of rules defined:

To define the rules, a series of variables may be used:

Variable Definition Numeric values Discret values
value Correspond to the value of the cell the color might be applied.
totalitems The number of items available for the current dataset.
Continuous values
max The maximum value of the dataset.
min The minimum value of the dataset.
avg The mathematical mean of the dataset.
med The median value of the dataset.
Discrete values
repeat_value Is the number of repetitions of the current value.
repeat_max Is the maximum number of repetitions of the dataset.
repeat_min Is the minimum number of repetitions of the dataset.

A large explanation of how to use these grids may be found here

Upon clicking the "Column Header" button, the following screen will be shown:

Column headers allow multiple columns to be grouped under a single header. A column is assigned a header by means of the Output Fields form.

• List Channels: headers appear as an extra row above the column titles, with labels grouping the columns.

• Superlist Channels: headers are used to group columns into a single chart.

This can only be used with "SuperList" channel types

As can be seen in the following image, the upper panel contains a button labelled "Series of Headers". This option allows the user to correlate multiple headers, with the goal of representing values from multiple graphs all in one.

In the "Series of Headers" input field, the user must indicate the header to which the current header will be connected.

# 4 Styling

## 4.1 Light display

The channels that will render a Table (List and SuperList Channel types), have two styling methods, the normal one and the light view mode. This one can be selected with the checkbox:

The channels that have this flag will render the table in a much more light view giving clarity to the channel information. This channel will be displayed without headers, with the minimum borders possible to make it easy to read the data, the text font will be bigger. On the other side, these tables won't allow to sort the data on the client side.

Default view Light view

## 4.2 Override CSS

It is possible to override default CSS styles via wic_styles_app_cssdata_v2 in wic_conf.