columns.AddChoiceHash
Overview¶
This is the "AddChoiceHash method" of the "columns object". The "Server Script" can dynamically set the "Option List" of "Class Column" by calling AddChoiceHash multiple times. When AddChoiceHash is called the first time, all choices set before the execution of the "Server Script" are cleared.
Supported Versions¶
- Pleasanter 1.2.4.0 or later
- Pleasanter .NET Framework version 0.50.267.0 or later
Limitations¶
- Only "Class Column" can be used.
- If "Use Search Function" is enabled in the settings of the corresponding "Class Column", operations on AddChoiceHash are not reflected in the "Option list". In this case, the "Option list" configured in the editor is displayed instead.
Prerequisites¶
- At least one option must be set in the option list for the target column.
- This is valid when the server script "Condition" is "Before opening the page" or "Before opening the row".
Syntax¶
Parameters¶
If the parameter value is omitted, it will be interpreted as AddChoiceHash(key, key).
| No | Parameter | Type | Required | Overview |
|---|---|---|---|---|
| 1 | key | object | Yes | Key |
| 2 | value | object | - | Value |
Return Value¶
There is no return value.
Usage Examples¶
In the example below, a "Option list" from TEST1 to TEST5 is set for ClassA.
When value is specified¶
JavaScript¶
In this case, you will get the same display result as when specifying the Option List of the Class Column as follows:
When value is omitted¶
JavaScript¶
In this case, you will get the same display result as when specifying the Option List of the Class Column as follows:
Supported Versions¶
| Supported Version | Details |
|---|---|
| 1.2.4.0 and later | Feature added |
| 1.4.23.0 and later | Parameter value can be omitted |

