How to get data from multiple tables in widget which are child to task table?

harry24
Tera Contributor

How to get data from multiple tables in widget which are child to task table?

1 ACCEPTED SOLUTION

Hi Harry, 


So you do GlideRecord the complete task table but add a condition with to say task type if one of x,y,z

This is what the query will look like on the task table records -
sys_class_name=change_request^ORsys_class_name=incident

find_real_file.png

 

If the answer has helped you, please mark the answer correct/helpful. Thank you.
-Harneet
ServiceNow Certified Technical Architect

View solution in original post

3 REPLIES 3

suvro
Mega Sage
Mega Sage

You can GlideRecord the task table in server script of the widget and store the data in data variables like

data.variable_name = task details;

You can use that in client script like c.data.variable_name and in html code directly as data.variable_name.

harry24
Tera Contributor

but if i do that it will take data from all tables which are child of task , i need it from specific tables itself

 

Hi Harry, 


So you do GlideRecord the complete task table but add a condition with to say task type if one of x,y,z

This is what the query will look like on the task table records -
sys_class_name=change_request^ORsys_class_name=incident

find_real_file.png

 

If the answer has helped you, please mark the answer correct/helpful. Thank you.
-Harneet
ServiceNow Certified Technical Architect