Join asmt metric result table with sc req item table Database View

Shivani_singh
Tera Contributor

Hi All,

I want to join tables asmt_metric_result and sc_req_item to create a database views.
Aim is to get field value from RITM for each survey.

 
1 ACCEPTED SOLUTION

@Shivani_singh 

try this, but please enhance if that doesn't work

I believe I have answered all your questions.

You can mark multiple responses as correct as per new community feature. So please do the same.

AnkurBawiskar_1-1747319240222.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

21 REPLIES 21

Ankur Bawiskar
Tera Patron
Tera Patron

@Shivani_singh 

there are lot of other tables involves when it comes to assessment, you need to add those tables as well in database view

if your requirement is to see Survey responses then why not use "Survey Overview" dashboard

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 
There is an OOB task_assessment_detail Database view present .
Can you help me to combine with sc_req_item.
I did try but not working.

@Shivani_singh 

are you having any assessment present on sc_req_item table?

If then simply use sc_req_item table there instead of task

OR

1) create similar to that and just update the where clause for the task one as this and it should start showing for RITM if RITM has any assessments

The part I highlighted in bold is newly added

asmtins_trigger_id = task_sys_id && task_sys_class_name='sc_req_item'

AnkurBawiskar_0-1747311222364.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

@Ankur Bawiskar 
When i gave the query the data present in the table got removed .

My requirement is we have a survey for a particular catalog, for that particular catalog we want to see the variable along with the survey.

I am not sure whether we can archive this, but I'm trying to archive with the database view .

@Shivani_singh 

showing variable and showing survey responses both are different things

what's your requirement?

If you are planning to show survey responses taken on RITM then the logic I shared should work fine provided you had surveys taken on RITM table

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