columns Attribute

In the .json file, the columns attribute enables you to describe the columns contained in the table.

This page discusses:

A column is also defined in JSON format and has the following attributes:

Name Description Mandatory
alternateTextAttribute Gives the name of the attribute used to store a string value, if a more formal object (requirement, task, …) is not defined yet. No
authorizedValues

Corresponds to an array of values that are valid for a cell in this column.

For example: "authorizedValues" : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
No
dataAttributes Corresponds to a list of PLM object types and their attributes, to be exposed in tables.

Attributes must be exposed as data-<attributeName> and are assigned as data-<attributeName>=<attributeValue>.

For example, if a column contains the following code: "dataAttributes": {"Requirement": ["Title", "project"]}, to colorize:

  • The background of a requirement tile in orange, the CSS file must contain:
    div.multi-tile-view[data-project="3DS Private Collab Space"] {
     background-color: orange; }
  • The background of cells in navy blue, the CSS file must contain:
    td[data-project="3DS Private Collab Space"] {
     background-color: navy blue; }

No
dataIndex Is selected from a list of predefined values or an attribute. For more information, see dataIndex Attribute. Yes
dropDown Corresponds to "true" or "false". If the value is "true", a list shows different values. You can click the cell and edit it. No
Note:

By default, the value is "true".

formula Refers to a module that computes a value from the causality relationship.

For example, the risk priority number corresponds to a computed attribute, its formula is the result of the product of severity, occurrence, and detection ranks.

The formula definition must comply with the following pattern:"formula" : "module:MyModule/PriorityFormula"

The refresh mode of computed values can be defined using the formulaRefreshMode attribute or corresponds to the "transient" mode if this attribute is not defined.

No
formulaRefreshMode If a formula is defined to compute a value from a causality relationship, the formulaRefreshMode attribute lets you define how the refresh of computed values is performed.

formulaRefreshMode can take the following values:

Value Description
"transient" The formula is computed and values are displayed at each modification of data, but the values are not persistent.
"auto" The formula is computed and values are displayed at each modification of data. The values are persistent.
"manual" The formula is computed on demand and values are displayed. The values are persistent.
"none" The formula is only computed until a value is found.
Note: Persistent values are kept in an existing attribute defined in the dataIndex attribute. When the value of formulaRefreshMode is "transient", the dataIndex must not be an attribute.

No
hints Refers to a JSON file that presents the descriptions and helps you complete cells for authorized values.

The hints definition must comply with the following pattern:

"hints": "i18n!MyCustomization/MyDescriptionFile"
Note: You must name the corresponding JSON MyDescriptionFile_language, where language is the current language of the widget, such as (en,fr,de,ja,zh). Otherwise the default language is English. Different translation files of description can be associated with the MyDescriptionFile name.

When you hover over an element, the definition can contain the following components:

Component Name Mandatory
Title The Title is the text label associated with the element. It describes the aim of the element. Mandatory
ShortHelp The ShortHelp provides a short description of the element. Mandatory
LongHelp The LongHelp is a longer description that provides more information about the element. LongHelp appears after a delay if you maintain the pointer over an element. Optional

For each authorized value, a definition is available in the JSON file, such as follows:

authorizedValue:{ 
                  "title":titleDescription, 
                  "shortHelp":shortHelpDescription }

To define the descriptions of authorized values, you can write an associated JSON file. For more information, see Example for hints Attribute.

No
isCharacterizable Corresponds to "true" or "false". If the value is "true", the column can be characterizable. No
Note:

By default, the value is "false".

isCharacterizationRichContentEditable If the value of isCharacterizationRichContentEditable is "true", the column can contain rich text characterizations.
Note: This attribute is valid only if the column is characterizable, that is isCharacterizable is "true".
No
Note:

By default, the value is "false".

multivaluedGroup Corresponds to the name of a logical group. This attribute is added to each column that defines a logical group. This attribute can only be added to columns that can contain object references.

For example, "multivaluedGroup": "Detection".

Note: Logical groups are mutually exclusive, that is a column can only have one logical group name associated.

A specific CSS can be associated with a logical group. The data-logical-group is available as soon as a group is created. For more information about the usage, see the dataAttributes attribute.

No
qualifiers

Corresponds to an array of additional information. For more information, see qualifiers Attribute.

No
superHeader Some columns can be gathered with a top header above their own headers.

The superHeader definition must comply with the following pattern for each column with the same top header title.

For example, "superHeader": "Failure Condition".

No
targetDataIndex If dataIndex is the name of an attribute, targetDataIndex is the dataIndex of a column containing the model, which defines the attribute.

For example, if causeFailureModedataIndex points to a failure mode, {"dataIndex": "V_Percentage" "targetDataIndex": "causeFailureMode" …} defines a column, which displays the attribute V_Percentage of the failure mode pointing to the causeFailureMode column.

Note: Attributes of a multivalued cell cannot be displayed in a column, for example, a cell containing N requirements as prevention control.
No
text Corresponds to the title of the column header. Yes
tileViewModules Refers to a list of modules that are used to present elements in tiles depending on element types.

The tileViewModules definition must comply with the following pattern:

"tileViewModules": {
"FailureMode" : "module:MyModule/SpecificTileView",
…,
"FailureModeSubType" : "module:MyModule/SpecificTileView2"
}

To use the description attribute for the display, you can write an associated JSON file. For more information, see Example for tileViewModules Attribute.

No
types

Corresponds to an array of any PLM object types. Relevant objects can be dragged into a cell of this column.

For example:"types" : ["Product", "Task"]
No
width

Expresses the width of the column.

For example: "width" : "200px"
Yes

Example for hints Attribute

{
	"1":{
	    "title":"The amount of harm...",
	    "shortHelp":"Less than 1 per million"
	},
	"2":{
	    "title":"The amount of harm...",
	    "shortHelp":"Between 1 per million and 2 per million"
	},

Example for tileViewModules Attribute

define('MyCustomModules/CustomTileView', [
	'module',
    'DS/CATSFYFailureModesEffectsAnalysis/Model/Model',
    'DS/CATSFYFailureModesEffectsAnalysis/View/TileView'
],

function (module, Model, TileView) {
    'use strict';

    var CLASS_NAME = 'CustomTileView';

    function CustomTileView() {}

    CustomTileView.prototype.getTitleAttributeName = function () {
        return Model.AbstractSafetyModel.V_DESCRIPTION;
    };

    CustomTileView.CLASS_NAME = CLASS_NAME;
    var CustomTileViewClass = TileView.extend({
        tagName: 'div',
        className: 'tile-view'
    }, CustomTileView.prototype);

    return CustomTileViewClass;
});