Skip to content

RMP_History

For History widgets, all functions in Common_Functions_AllWidgets are available, except for the following:

  • getLabel
  • setLabel
  • setValue
  • getValue
  • isRequired
  • setRequired
  • setRequiredRule
  • setValideRule
  • getListOfMyVariables
  • getValidationVariableMessage
  • setValidationVariableMessage
  • setMissingVariableMessage
  • getMissingVariableMessage

Members

RMP_HistoryColumns

Available column names for History widgets.

Properties:

Name Type Attributes Default Description
AUTHOR string rmp_history_author_name Name of the actor
EMAIL string mp_history_author_email Email of the actor
PUBLISHED string rmp_history_published Publication date
UPDATED string rmp_history_updated Last modification date
COMMENT string rmp_history_comment Comment

Methods

getColumnVisibility(columnIndex) → {boolean}

Returns true if the given column is visible, otherwise false.

Parameters:

Name Type Description
columnIndex number Index of the column

getComment() → {string}

Returns the comment provided to the widget.

Returns: string

getCompleteHistory() → {Array}

Returns the values in the columns of all rows of the history as an array of objects, [{column_name:value, ...}, ...].

Returns: JSONArray of JSONObjects representing the columns and their values Type: Array

getHistoryRow(rowIndex) → {Object}

Returns the values in the columns of the given row as an object, {column_name:value, ...}.

Parameters:

Name Type Description
rowIndex number Index of the row

Returns: JSONObject representing the columns and their values Type: Object

getType() → {string}

Returns the type of the widget (RMP_History).

Returns: string

getUrl() → {string}

Returns the URL where the widget gets its data.

Returns: string

isCommented() → {boolean}

Returns true if the user has added a comment, otherwise false.

*Returns: boolean

setColumnVisibility(columnIndex, visible)

Shows or hides the given column.

Parameters:

Name Type Description
columnIndex number Index of the column
visible boolean true to show the column, false to hide it

setCustomColumnScript(customColIndex, callBk)

Sets a callback function to handle a "custom column" script.

Parameters:

Name Type Description
customColIndex number Custom column ID
callBk module:RMP_History~customColumnScript Custom column callback script

Type Definitions

customColumnScript(row)

Callback function to execute the script related to custom or calculated columns.

Parameters:

Name Type Description
row Object Row which contains the custom column