{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":49048,"path":"servicenow-platform/service-catalog/variable-attributes.md","title":"Service Catalog variable attributes","bundle":null,"doc_type":null,"release":"australia","body":"\n# Service Catalog variable attributes\n\nThere are a few Service Catalog variables support specific attributes to define the behavior and restrictions for variables.\n\nIn the Catalog variable form, under the **Type Specifications** tab, you can specify the variable attributes in the **Variable attributes** field.\n\n**Note:**\n\n-   You can enter multiple attributes for a variable type by separating each with a comma.\n-   You can enter multiple values for an attribute by separating each with a semicolon.\n-   If you don't see the **Variable attributes** field, enable the **Show attributes when Type is One of Certain Values** UI policy.\n-   Pre-selected values are not cleared automatically when the dependent variable value changes when using an attribute or reference qualifier. Create a client script to clear the values based on your needs and the needs of your customer.\n\n## Variable attributes\n\n-   **allowed\\_extensions**\n\n    Specifies a list of allowed file types. For example, `allowed_extensions=txt;pdf`.\n\n    Applicable variables: Attachment\n\n-   **barcode**\n\n    Specifies if the barcode can be scanned using the mobile camera for identifying a variable value of a catalog item. For example, `barcode=true`.\n\n    Applicable variables: Single Line Text\n\n-   **max\\_file\\_size**\n\n    Specifies the maximum file size in MB. For example, `max_file_size=2`.\n\n    Applicable variables: Attachment\n\n-   **glide\\_list**\n\n    Changes the list collector interface from slushbucket to glide list.\n\n    Applicable variables: List collector\n\n-   **is\\_searchable\\_choice**\n\n    If set to **true**, enables you to search for and select the required value for the variable. For example, `is_searchable_choice=true`.\n\n    **Note:**\n\n    -   For Lookup select box, a default value is available at the page load itself.\n    -   This attribute is not applicable in Service Portal.\n    Applicable variables: Lookup select box, Select box\n\n-   **max\\_length**\n\n    Sets the maximum number of characters allowed in the field. By default, the field accepts long strings of text, several thousand characters. Set the **max\\_length** attribute as appropriate for the information that the variable is collecting. For example, to allow for entry of an address, set `max_length=200`, or other appropriate length.\n\n    Applicable variables: Single-line text, Wide single-line text\n\n-   **max\\_unit**\n\n    Sets the maximum unit of time for the duration. Possible values are `max_unit=days`,`max_unit=hours`,`max_unit=minutes`, and `max_unit=seconds`.\n\n    For example, if `max_unit=minutes`, the duration is displayed in minutes and seconds. In this case, a duration of 2 days 3 hours 5 minutes 15 seconds is displayed as 3065 minutes 15 seconds.\n\n    Applicable variables: Duration\n\n-   **no\\_filter**\n\n    Hides the filter fields that appear above a list collector.\n\n    Applicable variables: List collector\n\n-   **ref\\_ac\\_columns**\n\n    Specifies the columns with display values that appear in an auto-completion list in addition to the name. Separate column names with a semicolon. For example, `ref_ac_columns=user_name;email;sys_created_on` allows auto-complete to match text from the user\\_name, email, and sys\\_created\\_on columns.\n\n    Applicable variables: Reference, Requested For.\n\n-   **ref\\_ac\\_order\\_by**\n\n    Specifies the column that is used to sort the auto-completion list. For example, `ref_ac_order_by=name` sorts the auto-completion choices alphabetically by name.\n\n    Applicable variables: Reference\n\n-   **ref\\_auto\\_completer**\n\n    Specifies the name of a JavaScript class \\(client-side\\) that creates the list for auto-completion choices. Valid class values include:\n\n    -   **AJAXReferenceCompleter**: Displays matching auto-complete choices as a drop-down list. The list only displays the display value column of the reference table. If there is no other auto-completion class specified, reference fields automatically use this class.\n    -   **AJAXTableCompleter**: Displays matching auto-complete choices as rows in a table. The table displays the display value column of the reference table and any columns listed in the ref\\_ac\\_columns attribute.\n    -   **AJAXReferenceChoice**: Displays matching auto-complete choices as a drop-down list. The list only displays the display value column of the reference table. The list only displays up to 25 matching choices. If there are more than 25 auto-complete choices, the reference field instead displays the choices with the AJAXTableCompleter class.\n    Applicable variables: Reference\n\n-   **ref\\_qual\\_elements**\n\n    A list of fields to be sent back to the server to get an updated reference.\n\n    Applicable variables: Lookup multiple choice, Lookup select box, List Collector.\n\n\n**Important:** Attribute behavior is specific to the service catalog desktop.\n\n**Parent Topic:**[Create a service catalog variable](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/service-catalog/t_CreateAVariableForACatalogItem.md)\n\n**Related topics**  \n\n\n[Define help information for a service catalog variable]()\n\n[Define a question choice for a variable]()\n\n"}}