> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/customfielddata.md).

# CustomFieldData

The **CustomFieldData** object is provided to a [rename script](/directory-opus/manual/scripting/rename_scripts.md) via the [**GetNewNameData**](/directory-opus/manual/reference/scripting_reference/scripting_objects/getnewnamedata.md)**.custom** property. It provides access to the value of any [custom fields](/directory-opus/manual/scripting/rename_scripts/custom_fields_in_the_rename_dialog.md) that your script added to the *Rename* dialog.

| Property Name            | Return Type | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \<custom field property> | *variant*   | <p>The properties of the <strong>CustomFieldData</strong> object are entirely determined by the script itself.</p><p>In the <a href="/directory-opus/manual/reference/scripting_reference/scripting_events/ongetcustomfields.md"><strong>OnGetCustomFields</strong></a> method, assign the default values of any custom fields you want to the <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/getcustomfielddata.md"><strong>GetCustomFieldData</strong></a><strong>.fields</strong> property. The type of each default value controls the type of the property.</p><p>The <em>Rename</em> dialog only supports certain types of variables for custom fields, so you must only assign properties of compatible types. Supported types are:</p><ul><li>Boolean options (<strong>True</strong> or <strong>False</strong>) - the variable type must be <em>bool</em></li><li>Numeric options - the variable type must be <em>int</em></li><li>String options - the variable type must be <em>string</em></li><li>Drop-down list - the variable type must be a <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/vector.md"><strong>Vector</strong></a> with an <em>int</em> as the first element (to specify the default selection), and strings for the remaining elements.</li></ul> |
