Developer Function: Server Script: columns.AddChoiceHash
## Overview
This is the "AddChoiceHash method" of the "columns object". The "[Server Script](/en/manual/table-management-server-script)" can dynamically set the "[Option List](/en/manual/table-management-choices-text)" of "[Column](/en/manual/table-management-column)" by calling AddChoiceHash multiple times. When AddChoiceHash is called the first time, all choices set before the execution of the "[Server Script](/en/manual/table-management-server-script)" are cleared.
## Supported Versions
1. Pleasanter 1.2.4.0 or later
1. Pleasanter .NET Framework version 0.50.267.0 or later
## Limitations
1. Only "[Class Column](/en/manual/table-management-class)" can be used.
## Prerequisites
1. At least one option must be set in the option list for the target column.
1. This is valid when the server script "「Condition」" is " Before Screen Display" or "Before Row Display".
## Syntax
```
columns.[Column Name].AddChoiceHash(key, value);
```
## Parameter
|No|Parameter|Type|Required|Overview|
|:--|:----------|:----------|:---:|:---------------------------|
|1|key|object|Yes|Key|
|2|value|object|Yes|Value|
## Return Value
There is no return value.
## Usage Example
In the example below, the option list from TEST1 to TEST10 is set for "[Class Column](/en/manual/table-management-class)".
##### JavaScript
```
for (let i = 1; i <= 10; i++) {
columns.ClassA.AddChoiceHash(i, 'TEST' + i);
}
```
## Related Information
<div id="ManualList"><ul><li><a href="/en/manual/table-management-column">Manage Table: Column</a><span>10.07.2024 up</span></li>
<li><a href="/en/manual/table-management-class">Table Management: Item: Classification</a><span>08.13.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/table-management-choices-text">Table Management: Editor: Item Detail Settings: Option List</a><span>08.13.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/table-management-server-script">Table Management: Server Script</a><span>08.13.2024 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />