- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 02:29 AM
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 :
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)
Database View:
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
Solved! Go to Solution.
- Labels:
-
Vulnerability Response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 12:12 AM
Hi Rohila,
There is a good description for function fields in below:
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 06:27 AM
Hi Rohila,
Actually you are right. I was mistaken. By default all columns are available.
I looked into this more and I believe your issue is related to the Age field being a function field.
Apparently function fields have problems with database views. There is this link which provides a workaround via combination of a business rule and a background script. I hope it helps.
Kind regards,
Fatih.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 06:47 AM
The solution I understood is to update all the records so that the value stores in the Database.
In my case some VIT's are getting updated one way or other everyday and still the values are empty.
This article suggested to use a BR to calculate the value- I don't think this works for age field since the BR only triggers on insert/update for changes to be applied.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0686929
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 12:12 AM
Hi Rohila,
There is a good description for function fields in below:
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 12:43 AM
If the age values are important then we will create a field and populate them daily (But still the values will not be upto date after calculation)
I didnt even looked into docs assuming any values will be stored in database.
ThankYou for the info.
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