
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2021 11:37 AM
I'll start this by saying that I think that this is a coding noob question, but I'll post it anyway. I've set up a custom table, u_supported_applications, for a series of applications that our group supports. The table is pretty simple right now, just a list of 30 or so entries, with two fields, a name string and "hosted by," also a string. A table was created because, for the most part, these are applications that we don't "own" (i.e. hosted by outside agencies and other governments with no CIs in our instance) and there's a lot of variations to how they're used and deployed. The table has been used as part of a record producer, for typical incidents, such as account unlocks and support follow-up, which is where the problem is.
In the scripting, I'm trying to simply get the name string from the referenced table so that I can include it in the work notes or short description when the ticket is generated. However, nothing I've tried so far in the scripting returns the name string, just the sys_id. I'd include a code snippet but I've probably been through 20 or so variations without any success, So, Within the context of a record producer, what's the right method to call?
Again, sorry for the basic question and thanks for any advice,
Derek
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2021 12:06 PM
In the Script field on the Record Producer definition, you can use a line like this to copy the Display value of a reference variable to a field on the record that is produced.
current.fieldname = producer.variablename.getDisplayValue();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2021 12:51 PM
I'm glad this solved your issue, and I'm always happy to help!