The view configuration sets configuration for the entire view. It is accessed in View Settings by clicking the button and then the button in the sidebar header.
protected
(boolean): falseProtects the view from changes. Protected views can not be copied (save as) and the view can not be edited, the Grid Settings button will not be shown when the view is active (unless you have the Development Mode feature active).
name
(string)The name
property is a automatically generated key from view caption. This property is only used in column links config.
simpleView
(object)Configures restrictions when view settings are in simple mode.
{
"simpleView": {
"advancedModeProtected": true,
"availablePivots": [
"size_om",
"size_grp_ratio_name"
],
"hideFixedFilters": true,
"showColumns": true,
"showSeries": true,
"showDrilldowns": false,
"showActions": false,
"showFilters": true
}
}
advancedModeProtected
(boolean): false.: When true, users (other than owner or system user) can not enter advanced mode (limiting significantly what changes can be made to the view).availablePivots
(array of strings): When a non-empty array of string is specified, only the specified columns can be used as pivots.hideFixedFilters
(boolean): false: When true, view filters that are marked fixed are not shown while in simple mode.showColumns
(boolean): true: Whether or not columns are shown in simple view.showSeries
(boolean): true: Whether or not series are shown in simple view.showDrilldowns
(boolean): false: Whether or not drilldowns are shown in simple view.showActions
(boolean): false: Whether or not plan actions are shown in simple view.showFilters
(boolean): true: Whether or not filters are shown in simple view.filters
(object){
"filters": {
"constrainToIncludedColumns": true,
"excludeColumns": [ "col1", "col2", "col3" ],
"includeColumns": [ "col4", "col5", "col6" ]
}
}
constrainToIncludedColumns
(boolean) false: When true, the only filters that can be applied (either as view filters or ad-hoc filters) are the columns included in the view. This can be further modified by the excludeColumns
and the includeColumns
settings (see below).excludeColumns
(array of strings): Specifies what columns should not be made available as filters (either as view filters or ad-hoc filters).includeColumns
(array of strings): When constrainToIncludedColumns
is true, this specifies what other columns should also be available as filters. When constrainToIncludedColumns
is false, this setting has no effect.commands
(object)The commands
configuration adds a new column to the grid that will contain command links. When a command link is clicked by the user, a corresponding server side action is executed.
{
"commands":{
"columnCaption":"Confirm Options",
"width":100,
"caption":"Confirm",
"description":"Confirm all options of this product",
"action":"rm_confirm_option",
"actionArgs": {},
"confirmAction": true,
"confirmMessage": "Are you sure you want to perform this action?",
"availableInInserted":false,
"available":true,
"cond":{
"type":"notequal",
"column":"option_status",
"value":"ERP"
}
}
}
If more than one command is needed one can specify the commands separately under list
. An example:
{
"commands":{
"columnCaption":"Confirm Options",
"width":100,
"list": [
{
"caption":"Command 1",
"description":"This is the first action",
"action":"do_action_one",
"actionArgs": {},
"availableInInserted": false,
"available":true,
"cond":{
"type":"notequal",
"column":"option_status",
"value":"ERP"
}
},
{
"caption":"Command 2",
"description":"This is the second action",
"action":"do_action_two",
"actionArgs": {},
"availableInInserted":false,
"available":true,
"cond":{
"type":"notequal",
"column":"option_status",
"value":"ERP"
}
}
]
}
}
columnCaption
(string) “”: The caption of the added command column containing the command links.width
(number) 100: The width of the added command column.list
(array): List of commands caption
(string): The caption of the command.description
(string): A description of the command (visible as tooltip over the command link).classes
(array strings): Add CSS classes to button to change f.ex. it’s color. See Bootstrap documentation.icon
(string): Use Font Awesome icon instead of caption. E.g trash
. If caption is defined it will be displayed in button tooltip. See available icons here.action
(string): The procedure to run when the command button is clicked. More here.actionArgs
(object): Action arguments. More here.confirmAction
(boolean) false: Set to true to open confirmation modal before executing the command.confirmMessage
(string): The message to deliver in the confirmation modal.available
(boolean): true: Whether the command is available for normal (not inserted rows).availableInInserted
(boolean): false: Whether the command is available for inserted rows.cond
(object): Use to set condition when to show the command. More here.edit
(object)Enables or disables editing on columns. The condition specified here applies to all columns that have edit.enabled
set to true
, but the condition can be overridden for individual columns by setting the edit.cond
property in the column config.
{
"cond": {
"type": "in",
"column": "option_status",
"value": [ 1, 2, 3, 4]
}
}
More here about conditions.
format
(object)The format
configuration specifies formatting options for the whole view.
{
"format": {
"suppressPinnedNonSerieValues": true,
"hideDsColumn": true,
"restrictGridChanges": true,
"agGridProperties": {
"headerHeight": 40,
"someAgGridProperty": "someValue"
}
}
}
suppressPinnedNonSerieValues
(boolean) false: When true, no columns in the grid are pinned. Usually (when false), non-serie-columns and row totals are pinned to the left and all the data serie values are placed to the right of those columns (not moveable). When true, no such restrictions are made. Has no effect when no series are present in the view.hideDsColumn
(boolean) false: Hides the data series column in the grid when data series are displayed.restrictGridChanges
(boolean) false: When true, columns can not be pinned, moved or hidden.agGridProperties
: Allows explicitly setting AG Grid properties to the grid column. See documentation here. AG Grid properties are not tested and can easily introduce bugs.insert
(object)The insert
configuration specifies whether and how a row can be inserted into the grid. When insert is specified, the edit configurations for columns is used for setting the values of those columns.
{
"insert":{
"enabled": true,
"requiredColumns":[ "col1", "col2" ],
"editableColumns":[ "col1", "col2" ],
"action":"rm_add_product",
"actionArgs": {
"some": "value"
},
"preInsertQuery": {
"columns": [
{"name": "col1"}, {"name": "col2"}
],
"filters": [
{
"column": {"name": "col3"},
"operator": "=",
"values": "some"
},
{
"column": {"name": "col4"},
"operator": "=",
"values": {
"type": "fromDrillDown",
"name": "col4"
}
}
]
}
}
}
enabled
(boolean) false: Use to enable insert.requiredColumns
(string[]): Editable columns in inserted row that must have value when confirmed.editableColumns
(string[]): Editable columns in inserted row.action
(string) “insert”: The procedure to run when a row is inserted.The action is referring to the name in the de_action_sps table. More hereactionArgs
(object): {}: Action arguments.preInsertQuery
(object): A de query that is run once to get pre-populated values for the inserted row. The query can contain filters that refer to values coming from the selected drilldowns. To do this, set the “values” to an object containing the keys type
(with the value "fromDrillDown"
) and name
(with the name of the drop down column).The backend store procedure executed by the insert action can provide a refreshed row values. To do this it must return a "data"
property with the value ["refreshedRow"]
and provide a second result set containing the refreshed values. An example of this would be:
SELECT '{"result": "OK", "caption": "Everything executed fine!", "data": ["refreshedRow"]}' AS result
SELECT 'Some new value' AS item_group_lvl_1, 'Also new' AS item_group_lvl_2
row
(object)The row
config specifies how the content of the grid should be refreshed following the editing of a value. Row config can be added in view config and column config (column config overrides view config). The uniqueKeyColumns
, applyUniqueKeyFiltersOnly
can only be set at this (view config) level, these options can obviously not be overridden because of their nature (they apply to the whole view but not individual columns).
{
"row": {
"autoRefresh": true,
"refreshWholeGrid": false,
"uniqueKeyColumns": [ "col1", "col2"],
"applyUniqueKeyFiltersOnly": true
}
}
autoRefresh
(boolean) false: Automatically refresh the grid row after cell edit.refreshWholeGrid
(boolean) false: Automatically refresh the whole grid after cell edit. Note that autoRefresh
must be true for this to take effect.uniqueKeyColumns
(string[]): A list of columns that make up a unique key for the row. This is used to increase the cell edit and row refresh performance. When not used, all columns in the view are used which can result in unnecessarily complex queries in the database.applyUniqueKeyFiltersOnly
(boolean) false: By default, values from the drilldown and the filters are combined with values from uniqueKeyColumns
to query changed rows. When true, the values of the uniqueKeyColumns
will be the only filters applied to the query. In some cases this can help with the performance of edit/insert action but this needs to be used carefully.row.selection
(object)The row.selection
config specifies that checkboxes should be displayed in the beginning of all rows of the view. When an action is executed the checked rows will be added to the query sent with the action. The query will then filter to exactly the rows checked by adding a filter with the column specified in the fromColumns
array.
If no column is specified in the fromColumns
array (or if the array is empty or longer than 1) then the row.uniqueKeyColumns
array will be used. If no uniqueKeyColumns
array is specified the checkboxes will not be shown.
{
"row": {
"applyUniqueKeyFiltersOnly": true,
"selection": {
"enabled": true,
"fromColumns": [ "master_item_id]
}
}
}
serieTags
(string array)The serieTags
config specifies what data serie tags are defined for the view.
By default, the data serie tags defined for a view are detirmined automatically by a simple algorithm:
This default can then be overridden by the user interface. Words can be edited, added or deleted. Also the list can be reordered. In order to be displayed, a tag must match at least two series. If it matches no serie or only one serie it is not displayed at all.
When the default tags are overridden in the UI, the new list of tags is written into the serieTags
config as a simple list (array) of strings. The serieTags
config can of course also be directly edited in the config editor.
itemCard
(object)The item card can be added to any view by correctly setting the itemCard
property in the view config.
{
"itemCard": {
"idColumn": "item_sku_id"
}
}
idColumn
(string): The column in the grid that contains the item ID which is used to populate the Item Card. This column can be hidden in the grid.