How can we add field from other tables in "Ticket Fields" widget?

Narayan K
Tera Expert

Hi there,

 

I want to add field from "task_sla" table to "Ticket Fields" widget.

NarayanK_0-1756886673423.png

 

for example " Business Time left".

 

Thanks!

 

1 ACCEPTED SOLUTION

@Dr Atul G- LNG 

I agree that SLA information is not necessary for end users on portal.

But the requirement is achievable and I was able to achieve that.

The link I shared simply tells the server side script which needs to be enhanced and would help person with developer skills to know what change and where change is required.

@Narayan K  I was able to show that, see below

Output:

AnkurBawiskar_1-1756894497761.png

 

AnkurBawiskar_0-1756894478762.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

10 REPLIES 10

Thanks @Ankur Bawiskar , Just last Query, Is it possible to change label of SLA field "Business Tie Left" to something else on portal?

@Narayan K 

Thank you for marking my response as helpful.

yes why not.

The data is rendered using the JSON and it has key value pair, you can change the label as per your requirement.

I believe I have answered your question.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Narayan K 

you will have to clone the OOTB widget, then customize that Widget Server Side Script and then add this new widget again on your portal page.

You can query task_sla table for this INC and bring the data and then render

How to add/remove columns in 'Ticket Fields' widget in 'ticket' page of Service Portal 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Hi @Ankur Bawiskar , this article can be used to add new fields from same record. In my case I want to add field from another table.

 

is there any way to achieve it? or we can only add fields from same table only?

@Narayan K 

The link I shared is just a reference, yes you can add other fields from other table but as I mentioned you will have to perform GlideRecord and get the value

You will have to play with the Server Side Script

If my response helped please mark it correct and close the thread so that it benefits future readers.

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