Use Value Help in Script Editor

As an application designer or story developer, you can use different kinds of value help in the script editor depending on the context in which you're working.

Note

setVariableValue for tables and charts, and addMeasure for charts only support single variable values. That's why the member selector also allows only single selection.

You can open the value help by pressing CTRL + SPACE .
Tip
If pressing CTRL + SPACE doesn't display any values, make sure that the keyboard shortcut isn't used elsewhere. For example, in some Chinese input methods, it's used to switch language between Chinese and English. To make the shortcut take effect, you can do either of the following:
  • Press FN with CTRL + SPACE .
  • In your device settings, disable the keyboard shortcut CTRL + SPACE , or replace it with new keys.

Value Help for Measure

To get measure metadata in the script editor, press CTRL + SPACE .
Note

This value help is only available to chart.addmeasure().

Value Help for Measure
The member selector for metadata looks like this:
Member Selector for Measure Metadata
The result of metadata selection looks like this in the script editor:
Selection Result for Measure Displayed in Script Editor

Value Help for Variable Values

To get metadata for variable values, press CTRL + Space . If you are working with a dimension variable, you can open the member selector; otherwise you can only add or show the variable values in the code completion list.

Value Help for Dimension Variable
The member selector for dimension variable looks like this:
Member Selector for Dimension Variable
The selection result looks like this:
Selection Result for Dimension Variable Displayed in Script Editor
If you work with a variable that is not a dimension, the value help is displayed in the following way:
Value Help for Non-Dimension Variable
And the selection result in the script editor looks like this:
Selection Result for Non-Dimension Variable Displayed in Script Editor

Value Help for Selection Object

If a function needs a selection object as an argument, you can see available arguments by pressing CTRL + space . Value help is provided for keys, which represent the dimensions of an associated data source, or for the values of keys, which represent dimension members of the corresponding dimensions.

Note

To start the selection object you have to type in braces {} within the parentheses ( ).

Value Help 1 for Object Key, Dimension
Value Help 2 for Object Key, Dimension
Value Help for Object Value, Dimension Member

If you have a selection object like sel in the following examples, you can get value help for dimensions of an associated data source and access its properties by pressing CTRL + space after the dot operator.

You can also get value help for the corresponding dimension members of the dimension property when you try to assign or compare properties.

Value Help for Property, Member Access, Dimension
Value Help for Binary Expression, Dimension Member
Value Help for Assignment Expression, Dimension Member