Get variable display value for CMDB record creation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2024 10:47 AM
Hello,
Software engineering student here taking my first JavaScript class and I have been tasked with some work in SN Flow Designer. Basically what I need to do is to create a CMDB entry in a Flow Designer using the variables from the Catalog Item. Some of the fields are easy and map to a variable, but other variables, such as drop downs and reference fields are not so straightforward. Can someone please help me out with how I would script these variables?
For example, here I would need to populate the Circuit type field with the display value of a selectbox variable type.
Also any resource recommendations I should be looking at for scripting in ServiceNow as I grow my JavaScript skills would be super appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2024 10:55 AM
Hi @michael_smith ,
Please refer to this: Flow Designer Field Mapping - ServiceNow Community
var mapObj = {
"critical": "critical",
"major": "high",
"minor": "moderate",
"warning": "planning",
"ok": "low",
}
return mapObj[fd_data...] // need to update the fd_data.enter_path_here_to_get_severity
If this solution helps you then, mark it as accepted solution ✔️ and give thumbs up 👍!