Vulnerable Item Age information on database view

Voona Rohila
Kilo Patron
Kilo Patron

Hi There

I'm not able to view Age data in OOTB Database View - sn_vul_impacted_services ( which is a View connecting Vis to the services that have been impacted by the vulnerability )

I am able to see the age for the VIT but the same age value is not shown in the database view.

Am I missing something? Need some inputs on this issue.

VIT :

find_real_file.png

I verified ACL's too - I found a read ACL on age_duration field on VIT Table which provides access only for roles with sn_vul.read_assigned, sn_vul.read_all for Active VIT's.

Database view: (I guess the value is there but something is restricting to view the value)

find_real_file.png

Database View: 

find_real_file.png


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
1 ACCEPTED SOLUTION

Fatih Karacaer
ServiceNow Employee
ServiceNow Employee

Hi Rohila,

There is a good description for function fields in below:

https://docs.servicenow.com/en-US/bundle/sandiego-platform-administration/page/build/platform-functi...

Function fields versus calculated fields

The values of the calculated fields are stored in the database. The values of function fields or function scripts are not stored in the database, but are calculated at the time of retrieval. Function field values are always up to date.

So this age field is not stored in the database. That's probably the reason why we don't see them in the database view. If this Age field is very important, you can create a custom field on the VI table, and populate the value via scheduled job everyday. And you can use this custom field in the database view as a column.

Kind regards,

Fatih.

View solution in original post

8 REPLIES 8

Fatih Karacaer
ServiceNow Employee
ServiceNow Employee

Hi Rohila,

The images are not visible to me. I don't know if it is me or it is for everybody in the forum.

Anyway, I checked the database view and I don't see the Vulnerability Age field in view configuration.

find_real_file.png

What you can do is copy this (Insert and Stay) and add the age field from VIT to the sn_vul_vulnerable_item table record in the view as above. And you will be able to see the age.

Mark it as helpful if it is!

Kind regards,

Fatih.

Hi Faith

I modified my question with images now.

If no fields are defined then all the fields will be returned right?

 

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Not really. 

You need to add the fields you would like to be visible. By clicking New button in the last image I sent you can do that easily.

I found this info from the servicenow docs - https://docs.servicenow.com/bundle/sandiego-platform-administration/page/use/reporting/concept/c_Spe...

 

I am able to see the age field in database view but the values are not showing.

find_real_file.png


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP