Displays a detailed view of a database object, including tabbed miniviews consisting of linked menu items.
A Detailview can display any number of info boxes. Below the info boxes there can be zero or more tabs. A tab is an area with a Softadmin® component in it.
The tabs are situated below the info boxes. When the detail view is loaded, you can choose which tab is open initially. Please note that the tabs and the info boxes might compete for the vertical space if they both contain a lot of content.
If there is not enough space for a tab, you can collapse one or more info boxes (se above), or you can switch the tab to fullscreen mode.
The InfoView mode is used when all you need to display is InfoSQL.
To grab the user's attention, you can display an error, warning, or an informational message as a special banner. In this example, one of each is shown, but you can display any number of error, warning, or info messages.
KPIs are generated using JSON. Below you can see an example KPI with its corresponding JSON.
{
"Label": "Monthly earnings",
"Value": 56000,
"NumberOfDecimals": 0,
"Prefix": "$",
"Link": "KpiLinkAlias",
"PassingField": {
"KpiId": 5
},
"Trend": {
"Value": 15,
"Direction": "decreasing",
"Type": "negative",
"Unit": "%",
"NumberOfDecimals": 0,
"Period": "jan-feb"
}
}
Multiple KPIs can be shown side by side by putting them inside an array.
[{
// KPI properties
},
{
// KPI properties
}]
Value: The value displayed. Must be a valid decimal type. (mandatory)
Label: Label displayed above the KPI. (optional)
NumberOfDecimals: The number of decimals shown for the value. Defaults to 0. (optional)
Unit: Unit to display after the value. (optional)
Prefix: Prefix to display before the value. (optional)
Link: Alias of the link to follow when clicking the KPI. (optional)
PassingField: Object containing the link's passing fields as properties. (optional)
Trend: Trend object to signify changes since previous period. (optional)
Value: The value displayed. Must be a valid decimal type. (mandatory)
Prefix: Prefix to display before the value. (optional)
Unit: Unit to display after the value. (optional)
NumberOfDecimals: The number of decimals shown for the value. Defaults to 0. (optional)
Period: Text that indicates which time period the trend refers to. (optional)
Direction: The direction of the arrow preceding the value. Defaults to none. (optional)
Possible values |
---|
increasing |
decreasing |
none |
Type: Indicates whether the change is positive or negative by the color of the trend. Defaults to neutral. (optional)
Possible values |
---|
positive |
negative |
neutral |
The following query will produce the JSON used above.
SELECT
(
SELECT
'Monthly earnings' AS [Label],
56000 AS [Value],
'$' AS [Prefix],
0 AS [NumberOfDecimals],
-- 'KpiLinkAlias' AS [Link],
5 AS [PassingField.KpiId],
15 AS [Trend.Value],
'decreasing' AS [Trend.Direction],
'negative' AS [Trend.Type],
0 AS [Trend.NumberOfDecimals],
'%' AS [Trend.Unit],
'jan-feb' AS [Trend.Period]
FOR JSON PATH
) AS Kpi
Meters are generated using JSON. Below you can see an example Meter with its corresponding JSON.
{
"Value": 4200,
"Heading": "Daily earnings",
"Prefix": "$",
"NumberOfDecimals": 0,
"Link": "MeterCellLinkAlias",
"PassingField": {
MeterId: 1
},
"Intervals": [
{
"IntervalStart": 0,
"IntervalEnd": 1000,
"ColorName": "red",
"Tooltip": "This is bad for business."
},
{
"IntervalStart": 1000,
"IntervalEnd": 2000,
"ColorName": "yellow",
"Tooltip": "This can be tolerated."
},
{
"IntervalStart": 2000,
"IntervalEnd": 5000,
"ColorName": "green",
"Tooltip": "The business is thriving."
}
]
}
Multiple meters can be shown side by side by putting them inside an array.
[{
// Meter properties
},
{
// Meter properties
}]
Value: The value displayed. Must be a valid decimal type. (mandatory)
Heading: Heading displayed above the meter. (optional)
NumberOfDecimals: The number of decimals shown for the value. Defaults to 0. (optional)
Unit: Unit to display after the value. (optional)
Prefix: Prefix to display before the value. (optional)
Link: Alias of the link to follow when clicking the meter. (optional)
PassingField: Object containing the link's passing fields as properties. (optional)
Intervals: Intervals to be shown in the meter. (mandatory)
IntervalStart: The start of the interval, must be exactly the end of the pervious interval if any. Must be a valid decimal type. (mandatory)
IntervalEnd: The end of the interval. Must be a valid decimal type. (mandatory)
ColorName: The name of the interval color, mandatory if more than one interval is specified. If not specified a neutral color will be used. (optional)
Possible values |
---|
green |
yelllow |
red |
Tooltip: Tooltip for the interval. (optional)
The following query will produce the JSON used above.
;WITH Intervals AS
(
SELECT
0 AS IntervalStart,
1000 AS IntervalEnd,
'red' AS ColorName,
'This is bad for business.' AS Tooltip
UNION ALL
SELECT
1000 AS IntervalStart,
2000 AS IntervalEnd,
'yellow' AS ColorName,
'This can be tolerated.' AS Tooltip
UNION ALL
SELECT
2000 AS IntervalStart,
5000 AS IntervalEnd,
'green' AS ColorName,
'The business is thriving.' AS Tooltip
)
SELECT
(
SELECT
'Daily earnings' AS [Heading],
4200 AS [Value],
'$' AS [Prefix],
0 AS [NumberOfDecimals],
-- 'MeterCellLinkAlias' AS [Link],
5 AS [PassingField.MeterId],
(
SELECT
I.IntervalStart,
I.IntervalEnd,
I.ColorName,
I.Tooltip
FROM
Intervals I
FOR JSON PATH
) AS Intervals
FOR JSON PATH
) AS Meter
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.
Displays the link with the specified alias in the title row of the box.
The link should be of type "Top link (InfoSQL)".
Columns named PassingField_<xxx> will not be shown in the box and can be referenced from the link as a Column value with name <xxx>.
Only one BoxLink per box can be used.
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 charts. Read more
JSON to generate a KPI. Read more
JSON to generate a row of meters. Read more
Possible value | Description |
---|---|
boolean checkbox | Legacy alias. Use "checkbox" instead. |
boolean dropdown | |
chart | |
checkbox | |
checkbox tree | |
colorpicker | |
date | |
datetime | |
dropdown | |
file | |
file upload area | |
heading | |
heading with checkbox | |
hidden | |
html | |
info text | |
listbox | |
multi-autosearch | |
multi-listbox | |
multi-picker | |
multirow | |
password | |
picture | |
radio buttons | |
radio cards | |
signature | |
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 |
Which direction the script is written in. Not to be confused with the CellAlignment property.
Possible value | Description |
---|---|
default | System default. Not useful unless you are trying to override an already explicit text direction on existing field information. |
ltr | Left-to-right (for example English) |
rtl | Right-to-left (for example Arabic) |
The width of the control.
At one point, this was a pixel value. Back when Softadmin used Verdana 10px, and before fields had width-categories. Now, it is just a value that is converted to a width category.
The possible values listed below are just suggestions. For example, both 1 and 30 will be converted to shortest, and both 500 and 9999 to longest.
Possible value | Description |
---|---|
150 | Medium-long |
30 | Shortest |
300 | Long |
500 | Longest |
60 | Short |
90 | Medium short |
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'.
The stored procedure should be named <Schema>.<Table>_GetDetails
.