Is there a way to dot walk from a Target table to the Staged source Import set table?

GauravT47983100
Tera Contributor

Hello Snow Community,

In Vulnerability Response Security Exposure Management, there is a stage table named 'sn_vul_tenable_sc_vuln_import' which gets its data from using Tenable API. The table targets Vulnerable items [sn_vul_vulnerable_items] table. What I am looking for is to find a way to dot walk back to a field name 'u_repository' that exist inside the staged table. Now, I tried using the list view to filter out and Dot walk to that table records, but could find it. I am not sure if ServiceNow allows to dot walk from a target table to a staged table. If anyone has any information, please share. Thank you.

2 REPLIES 2

Todd Goodhew
Tera Expert

Target tables do not have reference fields back to the Import set tables. 

The only way to do this is via script.  You have the sys_id of the record in the Vulnerable Items table.  You'd have to query the import set table where the Target field is that sys_id.  But then you'd get all import records that updated that target record.

 

I don't know what you are trying to achieve here nor why you'd ever want to link back to the import record.

bsmolski
ServiceNow Employee

Hi Gaurav,

If I needed to do this, I'd create a Database View. DB Views allow you to join data from multiple tables into a single pseudo-table. It works by defining INNER JOIN logic between the connecting tables. This means if there's a unique identifier in your System Import Set (staging) table that matches a field in your Vulnerable Items table, you can set that as your joining logic. Example:

Table 1: sn_vul_tenable_sc_vuln_import - Variable prefix = vimport - Unique Identifier field = v_num (let's say)
Table 2
: sn_vul_vulnerable_items - Variable prefix = vitems - Unique Identifier field = number (let's assume this is what was used as the coalesce field in the system import set).

Where clause logic
: vitems_number = vimport_v_num

Note that creating Database Views requires [admin] role privilege. You can read more about using DB Views here: https://www.servicenow.com/docs/r/platform-administration/table-administration-and-data-management/c...

Hope that helps.

Please consider making my posts as "Helpful" or hitting the Thumb Icon and marking as "Correct". Thanks!