- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 04:24 PM - edited 12-16-2022 04:47 PM
Hello,
I am very new to SNOW, and I am learning a lot of things very fast. I am on a project to add a short description in a dropdown menu. I am able to create the dropdown menu, but I need something like the following (a brief description of what it is). At this point, I am adding the option from a List Collector, but is it a better way?
Thank you all
If I click for example a dropdown Menu that says: Countries
IT will display:
- PERU - Located in south America
- ENGLAND - Located in Europe
And when I select one, it will just display the name of the country
Or like this:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2022 01:53 AM
Hi @AngelP83 ,
1. Create 'Country' variable of reference type (if want to use core countries)
2. Create 'Cities' variable of reference type (if want to use cmn_location) or selectbox type.
3. Create a 'Description' variable
4. Script Include:
5. Catalog Client Script to populate Description
6. Final Result on Request form:
7. If you don't want to have separate 'Description' variable you can show location.name in 'Cities' variable itself.
Add name in ref_ac_columns
Regards,
Reshma
**Please mark my answer correct or helpful based on the impact**
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 09:04 PM
@AngelP83 If you want to select more than one options then go with "List collector". If you want only one option should be selected then go with reference field.
And for showing the short description in the drop down option you need to add the variable attributes. Please check below link and check ref_ac_columns
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2022 12:09 AM
Hi @AngelP83 ,
You can use the Annotation tab on a variable and use Show Help and Help tag and Hep text or Instructions to display information or description of field.
If you want to add the short description for the field you can client script show field message which is below of a field.
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.showFieldMsg('bu', 'Please add BU Name');
}
Result:
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2022 01:53 AM
Hi @AngelP83 ,
1. Create 'Country' variable of reference type (if want to use core countries)
2. Create 'Cities' variable of reference type (if want to use cmn_location) or selectbox type.
3. Create a 'Description' variable
4. Script Include:
5. Catalog Client Script to populate Description
6. Final Result on Request form:
7. If you don't want to have separate 'Description' variable you can show location.name in 'Cities' variable itself.
Add name in ref_ac_columns
Regards,
Reshma
**Please mark my answer correct or helpful based on the impact**