sys_popup view not displaying all the fields

Pavan Kumar BV
Kilo Expert

Hi,

I have "sys_popup" view enabled on my incident table. However, I'm not able to see all the fields(in popupview) when i try to view the incident data from a custom field that i created on one of my application.

Below is my business scenario:

I have to perform ticket quality audit on my incidents, so i have designed a custom form and added a incident number reference field to it along with some other fields from incident table using dot-walking. So as soon as i select the INC number other fields of that INC gets auto populated. 

Now how can i include the Additional Comments and Worknotes here on my custom form?

Below are some steps i tried:

  1. Added the additional comments and worknotes fields with the help of dot-walking. But once i submit my Audit record an empty additional comment and work notes are getting added to the actual incident.The more times you perform audit on the same incident the more number of comments and work notes are getting added( this is happening even if the INC state is closed). 
  2. Tried to display the comments and worknotes in the the popup view instead of in the actual form. So i have moved the additional comments, worknotes section after the Description field. But, that is actually changing the view on incident form as well(Default view is also getting changed). I want this to happen only on my popup view not on the default view.

As you can see from my attachments, the popup view on my INC table has worknotes and additional comments(Notes section). But when i try to see the data from my custom form, it shows only till description field. Not the notes section.

Can anyone please help here. Thank you very much in advance. 

 

14 REPLIES 14

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

This are journal fields and this field never hold the value in it. 

 

Meaning: When you put something in additional comments and worknotes and save the form the field is cleared and the text which you put there goes to journalentry table and is visible in activity.

So you have to query the incident table and then populate the worknotes and comments via script not via dot walk.


Thanks,
Ashutosh

Hi Ashutosh,

Can you please help me with the code to achieve it. I have tried writing an onchange client script on the Incident number field so that as soon as i change the Incident number the Additional comments will also get changed. But i'm stuck at how to pass the control to incident table. 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}

var table = new GlideRecord('x_4738_wood_in_audit_module');
table.addQuery('x_4738_wood_in_audit_module', current.incident_number.sys_id);

Is this the correct way?

Hi Pavan,

In order to show those 2 fields on pop-up view. Did you need create pop-up view for that table

sharing below links for creating those

https://community.servicenow.com/community?id=community_question&sys_id=ce8a249bdb6ca308200f0b55ca96...

https://snprotips.com/blog/2016/1/19/using-syspopup-view-to-customize-flyoutpopup-info-on-reference-...

Also why you require onchange client script to populate

this can be done using before update BR on your custom table

get the incident work notes etc and set it in current form work notes

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

Thanks for your response. I did create sys_popup view on INC table. As you can see in my attachments(Sys_popup on my incident table.JPG), my popup view has Notes section enabled but when i hover my cursor on INC number on mu Audit form i can see only till description field(Popup view on my Audit form.JPG)

Regarding the BR, can you please help how to reference the INC table and populate them here. I'm very new to scripting.

Thanks in advance.