The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Record producer data to Incident description

tcorniels
Tera Contributor

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.

10 REPLIES 10

abilash_017
Mega Guru

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


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:


  1. var test = [];
  2. for(var v in producer){      
  3.         if (v.startsWith("IO") && producer[v] != 'false' && producer[v] != '' && producer[v] != 'No' && producer[v] != '-- None --') { //only variables        
  4.                   var question = new GlideRecord('item_option_new');      
  5.                       question.get(v.substring(2)); // Querying by sys_id to determine question text        
  6.                   test += question.question_text + ": " + producer[v] + "\n"; // Set key:value pair to variable    
  7. }   }
  8. current.work_notes = test; // Set Work Notes on new record


Which gives me the following


Work Notes.png


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,


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


Hi Jaytee,

 

Did you get the chance to display the value in same variables order in the Incident Description Field?

 

Thanks & Regards,

Ram Prakash