# OnScriptColumn

The **OnScriptColumn** event is the entry point for a [custom column](../../../scripting/example_scripts/adding_a_new_column) added by a [script add-in](../../../scripting/script_add-ins). The actual name of the event is defined by the script itself, when the command is added via the [**ScriptInitData**](../scripting_objects/scriptinitdata)**.AddColumn** method - **OnScriptColumn** is merely a placeholder name.

| **Method Name:**   | OnScriptColumn                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Argument Type:** | [**ScriptColumnData**](../scripting_objects/scriptcolumndata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Return Type:**   | _none_                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Description:**   | <p>When a script add-in adds a new column using <a href="../scripting_objects/scriptinitdata"><strong>ScriptInitData</strong></a><strong>.AddCommand</strong>, it specifies the name of its entry point with the <strong>ScriptColumn.method</strong> property. When Opus wants to retrieve the value of the column for a particular file or folder, Opus will call that method within your script.<br>The <a href="../scripting_objects/scriptcolumndata"><strong>ScriptColumnData</strong></a><strong>.item</strong> property provides information about the file or folder in question, and the <strong>col</strong> property identifies the column you should return data for (in case you use the one method for more than one columns).</p><p>The return value from this event is ignored - instead, you should return the column data (and optionally, sorting and grouping information) by setting the appropriate values in the <a href="../scripting_objects/scriptcolumndata"><strong>ScriptColumnData</strong></a> object.</p> |
