- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2023 09:13 AM
Can anyone help me to populate a variable depending on selection of choice list in another variable of a catalog item. @Ankur Bawiskar @Community Alums @Mark Roethof @asifnoor @Amit Gujarathi @Gunjan Kiratkar @RaghavSh
One variable is created as mentioned below screen shot
In the below mentioned screen shot once user select the highlighted option
Then the below mentioned variable must populate
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2023 11:41 AM
Ahh I have misunderstood. A catalog UI policy would work for this:
When to apply: Select Type of Risk Assessment is Vendor Security Assessment (VSA)
Ensure "Reverse if false" is selected
Save record
set UI policy to set vendor_contact_name's visibility to "true"
Would look similar to this when completed with your variable names:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2023 10:54 AM
Hi Yerasumalli,
Seems like a catalog client script would do here:
Type: On Change
Variable Name: Vendor Security Assesmenet (VSA)
Here's some untested psudocode:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(newValue == "Vendor Security Assessment (VSA)"){ //set to value of select box
g_form.setValue("vendor_contact_name", "whatever text you want to populate"); //set value to text you want to populate
}
}
-Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2023 11:12 AM - edited 01-11-2023 11:26 AM
There is no any text to populate as the user needs to enter name as the "vendor_contact_name" is text filed.
So, now what should I need to do at the "whatever text "
g_form.setValue("vendor_contact_name", "whatever text you want to populate");
and the filed is visible before selecting the Variable Name: Vendor Security Assesmenet (VSA)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2023 11:23 AM
Yera,
I may have misunderstood. Is this the correct requirements?
1. User selects option from "Select Type of Risk Assessment"
2. If user selects the option "Vendor Security Assessment (VSA)" then populate text field ("whatever text you want to populate")
3. If user selects another option, user populates text field
-Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2023 11:33 AM
1. User selects option from "Select Type of Risk Assessment"
2. If user selects the option "Vendor Security Assessment (VSA)" then variable (vendor_contact_name) must populate and it's just text field.
3. If user selects another option, then the variable must not display.
what should I need to do