Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**Dynamic Catalog Variable Label Update**

**Description**
This catalog client script dynamically updates the label of one variable based on the value of another.
It's useful when you want to provide contextual labels for dependent fields in Service Catalog items.

**Example**
If Asset Type = "Software", then the label for "Asset Name" becomes "Software Asset Name".

**Catalog Client Script Configuration**
- Type: onChange
- Variable name: asset_type
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}

var asset = newValue + ' Asset Name';
g_form.setLabelOf('asset_name', asset);
}
Loading