Displays a pivot grid from a resultset.
Supports row, column and cell links.
To define a column link use colid={0} in passing fields.
To define a row link use rowid={2} in passing fields.
To define a cell link use rowid={2}&colid={0} in passing fields.
Cell links are only visible from the navigator. The grid can be dynamically sorted by columns and/or rows by the user.
There's a tutorial.
Possible value | Description |
---|---|
xlsx | The document is generated as a Microsoft Excel 2007 (*.xlsx) document. InfoSql and style information will be rendered. |
text | The document is generated as tab separated text. InfoSql and style information will not be rendered. This mode causes a warning when opened in Microsoft Excel 2007 and later versions. |
SQL that returns data for the pivot grid. The original sorting order of the grid will be the order of appearance of rows and columns in this result set.
Allows you to validate the parameters supplied by the user before any other SQL is run in the component. This call is only made if the component has visible parameters, the SQL is a stored procedure, and Validate parameters is checked.
SQL that can have several resultsets that are displayed at top of component.
Sets the text color of <colname> to the specified color. See Colors.
Color to use for the icon specified in <colname>_Icon. See Colors.
Json to generate a row of meters. See the documentation for the Detailview component for more details.
Possible value | Description |
---|---|
Center | Center aligned. |
Left | Left aligned. |
Right | Right aligned. |
Possible value | Description |
---|---|
boolean checkbox | Legacy alias. Use "checkbox" instead. |
boolean dropdown | |
chart | |
checkbox | |
Checkbox tree | |
colorpicker | |
date | |
datetime | |
dropdown | |
file | |
heading | |
heading with checkbox | |
hidden | |
html | |
info text | |
listbox | |
multi-listbox | |
multi-picker | |
multirow | |
password | |
picture | |
radio buttons | |
textarea | |
textbox | |
textbox with autosearch | |
textbox with autosuggest | |
textbox with dropdown | |
textbox with popup | |
time | |
uneditable text |
Possible value | Description |
---|---|
Default | Inherit layout from menu item. |
LabelAbove | Full width, label above. |
LabelLeft | Label to the left. |
NoLabel | Full width, no label. |
Standard | Deprecated. Use LabelLeft instead. |
JavaScript that controls the mandatory status of the field, this overwrites nullchoice if set. This is only available to control types for which the mandatory JavaScript field is visible in the user interface.
Possible value | Description |
---|---|
Hyperlink | |
MailToLink | |
PhoneLink |
InfoSQL can declare JavaScript used by the menu item.
Example
SELECT
'thirdPartyApi.showMap(street, city, country)' AS JavaScript,
StreetAddress AS street,
CityName AS city,
CountryName AS country
FROM
...
Possible value | Description |
---|---|
Current | This is the current step. |
Done | This step has been completed successfully. |
Failed | Something went wrong in this step. |
Future | This step is later on in the process. |
Use this call to restrict which entries a user is allowed to view and edit, and to log which entries a user views.
Access to a menu item is normally controlled through functions and roles alone but some entities need more fine grained control. For example, a user may have access to the View Member menu item for normal members but not for members with a protected identity.
The menu items a user visits are always logged (in ADMINLogMenuItem) but for sensitive data you may need to log exactly what entries are viewed. Do the logging in this call as the common ways of viewing data (grid and InfoSQL) are not allowed to modify the database.
If you bind a scalar function instead of a stored procedure to this call then its name must end with '_GrantAccess'.
Example of how a many-to-many-relationship can be displayed in a pivot grid by first defining rows and columns followed by the actual data we want to show.
CREATE PROCEDURE dbo.Pivot_Test
AS
BEGIN
SET XACT_ABORT, NOCOUNT ON
-- Column data
SELECT
DayId,
DayName [ColumnLabel]
FROM
(
VALUES
( 1, 'Måndag' ),
( 2, 'Tisdag' ),
( 3, 'Onsdag' ),
( 4, 'Torsdag' ),
( 5, 'Fredag' )
) D (DayId, DayName);
-- Row data
SELECT
GroupId,
GroupName [RowLabel]
FROM
(VALUES
(1, 'Pegasus'),
(2, 'Orion'),
(3, 'Lynx'),
(4, 'Taurus')
) G (GroupId, GroupName);
-- Celldata
SELECT
DayId,
GroupId,
'Ja'
FROM
(
VALUES
(1, 1), -- Pegasus jobbar måndagar
(2, 2), --Orion jobbar tisdagar
(2, 4), -- Orion jobbar torsdagar
(3, 3), -- Lynx jobbar två dagar
(4, 3)
) GW (GroupId, DayId);
END