Database Views help

Jennifer Red
Tera Expert

I'm trying to use a Database View to connect the asmt_assessment_instance table with the task table. What I'm needing to do is use the task.number to match with the asmt.trigger_id to be able to get the requestor's phone # in their Task ticket. Is this possible? Or will it be more complicated because of the differences between inc and sctask? I'm getting no results when I try to do this database view... even if I do it just with the inc table. I also discovered the asmt.task_id field, but I'm still receiving no results. Thanks for any help!

JenniferRed_0-1714423411739.png

 

7 REPLIES 7

Murthy Ch
Giga Sage

Hello @Jennifer Red 

To get the incident assessement records you can try something like below:

MurthyCh_0-1714426595198.png

But, if you want to get the requestor's phone you can directly dot-walk to the phone number field from the user field.

 

 

Thanks,
Murthy

Thank you, @Murthy Ch ! I was trying to do this for sc_tasks and incs, but I'm still having some trouble. What you mentioned above for the INC seems to be working well. Do you have any thoughts for the sc_task? I feel like it would be more trouble since the requestor's phone # is in a variable set on the sc_tasks. Also, on the INCs I'm not seeing where I can dot-walk to the response that was provided on the INC itself... I can see where I can get to it via Assigned To then Home Phone, etc but that doesn't work because our users' information isn't in ServiceNow itself. They enter it for the INCs &/or SCTASKs.

@Jennifer Red 

Yes, we can do it for sc_task as well. Can you explain me your complete requirement with better understanding, so that I can try and send it to you.

 

Thanks,
Murthy

@Murthy Ch I'm needing to be able to view the Completed Surveys and get the Assigned To person's contact # from where they put it in on the INC or in a variable set for the SCTASK generation. The requirement is to be able to reach out to the user's to be able to ask more questions, etc. I would assume that I could utilize the trigger_id from the asmt table, but when I try to use what you stated above but translate to the sc_task table I get no results again when I "Try it".