Record producer data to Incident description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2016 11:46 AM
I have created a record producer that will gather some information and create an incident. I have then created a template to fill out some of the standard incident fields. What I am having a problem with is that once the user completes the form the incident will be created but none of the information they entered appears anywhere. Ultimately I would like all of their entered field information to appear in the description field of the created incident but can't figure out how to get that to happen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2016 01:51 AM
Hi Tim,
I just want to give a suggestion when working on Record Producer. I guess you have added table "incident" and want to populate the same data entered in RP. So, mostly for such cases however the field names of RP and incident table will be same. So, make sure you give all the details of field same as table including "name" which will populate automatically.
As I worked on such before and I found it while analyzing.
Mark if it is helpful or correct.
Thank you.
Abilash JS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2016 09:50 PM
I think I have it now - although I still need to work on getting the variables to display in the same order as they appear on the form eg the field "SharePoint Related Application:" should appear first followed by "HUB Support Options:". Here is the modification to the code to ensure that only those items that are answered are shown:
- var test = [];
- for(var v in producer){
- if (v.startsWith("IO") && producer[v] != 'false' && producer[v] != '' && producer[v] != 'No' && producer[v] != '-- None --') { //only variables
- var question = new GlideRecord('item_option_new');
- question.get(v.substring(2)); // Querying by sys_id to determine question text
- test += question.question_text + ": " + producer[v] + "\n"; // Set key:value pair to variable
- } }
- current.work_notes = test; // Set Work Notes on new record
Which gives me the following
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2016 12:09 AM
Good Day Everyone
HI Andrew, solution works perfectly. We have the same issue populating the data in order, do you have the chance to come up a solution on your sequential output? I mean, we have the same result and most resolving team is looking for the information in order.
I think I have it now - although I still need to work on getting the variables to display in the same order as they appear on the form eg the field "SharePoint Related Application:" should appear first followed by "HUB Support Options:".
Thank you,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2016 06:35 PM
Hi Jaytee - unfortunately I haven't had an opportunity to progress this due to other demands on my time. It came down to advising the support team to work with what they were getting. I am not a coder/developer so the organisation has required me to "get things working in the first instance" rather than "get them working so it is nice for the support team"
Apologies that I cannot assist more
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2018 06:52 AM
Hi Jaytee,
Did you get the chance to display the value in same variables order in the Incident Description Field?
Thanks & Regards,
Ram Prakash