# CustomFieldData

The **CustomFieldData** object is provided to a [rename script](https://chaoses-ib.gitbook.io/directory-opus/manual/scripting/rename_scripts) via the [**GetNewNameData**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/getnewnamedata)**.custom** property. It provides access to the value of any [custom fields](https://chaoses-ib.gitbook.io/directory-opus/manual/scripting/rename_scripts/custom_fields_in_the_rename_dialog) 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="../scripting_events/ongetcustomfields"><strong>OnGetCustomFields</strong></a> method, assign the default values of any custom fields you want to the <a href="getcustomfielddata"><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="vector"><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> |
