create_catalog_item_variable
Generate a new catalog item variable in ServiceNow by defining its name, type, label, and other attributes to customize user input fields.
Instructions
Create a new catalog item variable
Input Schema
Name | Required | Description | Default |
---|---|---|---|
catalog_item_id | Yes | The sys_id of the catalog item | |
default_value | No | Default value for the variable | |
description | No | Description of the variable | |
help_text | No | Help text to display with the variable | |
label | Yes | The display label for the variable | |
mandatory | No | Whether the variable is required | |
max | No | Maximum value for numeric fields | |
max_length | No | Maximum length for string fields | |
min | No | Minimum value for numeric fields | |
name | Yes | The name of the variable (internal name) | |
order | No | Display order of the variable | |
reference_qualifier | No | For reference fields, the query to filter reference options | |
reference_table | No | For reference fields, the table to reference | |
type | Yes | The type of variable (e.g., string, integer, boolean, reference) |
Input Schema (JSON Schema)
{
"description": "Parameters for creating a catalog item variable.",
"properties": {
"catalog_item_id": {
"description": "The sys_id of the catalog item",
"title": "Catalog Item Id",
"type": "string"
},
"default_value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Default value for the variable",
"title": "Default Value"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of the variable",
"title": "Description"
},
"help_text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Help text to display with the variable",
"title": "Help Text"
},
"label": {
"description": "The display label for the variable",
"title": "Label",
"type": "string"
},
"mandatory": {
"default": false,
"description": "Whether the variable is required",
"title": "Mandatory",
"type": "boolean"
},
"max": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for numeric fields",
"title": "Max"
},
"max_length": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum length for string fields",
"title": "Max Length"
},
"min": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for numeric fields",
"title": "Min"
},
"name": {
"description": "The name of the variable (internal name)",
"title": "Name",
"type": "string"
},
"order": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Display order of the variable",
"title": "Order"
},
"reference_qualifier": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "For reference fields, the query to filter reference options",
"title": "Reference Qualifier"
},
"reference_table": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "For reference fields, the table to reference",
"title": "Reference Table"
},
"type": {
"description": "The type of variable (e.g., string, integer, boolean, reference)",
"title": "Type",
"type": "string"
}
},
"required": [
"catalog_item_id",
"name",
"type",
"label"
],
"title": "CreateCatalogItemVariableParams",
"type": "object"
}