Read and update Values

Availability table

Controller availability

Module

Available

module.scripts

Supported feature

module.keycloak

Supported feature

values controller

Access to values from the hierarchy.

Warning

To be able to read a value, the script must first declare that value in its accessed values.

Represent a Value returned by this controller.

Value.content

The content of the value, can be null in case of reading errors (boolean, number or string depending on the type field).

Value.id

This string is a unique identifier that represent the value.

Value.error

This string contains the error in case of error, empty otherwise (string).

Value.type

This string contains the type of properties content. Possible values: BOOLEAN, INTEGER, DECIMAL, TEXT (string).

Value.timestamp

Number that contains the timestamp attached to the value.

values.blindUpdate(valueId: string, value: any)

Update a value (variables only) but don’t give a status if successful or not.

Arguments:
  • valueId – The id of the variable

  • value – The content to set

values.get(valueId: string)

Read a value.

Arguments:
  • valueId – The id of the value

Returns:

Return an object of type Value() that content current properties of valueId

values.update(valueId: string, value: any)

Update a value (variables only) and return the status of the action.

Arguments:
  • valueId – The id of the variable

  • value – The content to set

Returns:

Return a executionResult().