- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2023 03:03 PM
I'm looking to create reports against our Survey table (ast_assessment_instance). When a Case gets closed, we send out a survey. We have a Related List for the Assessment/Survey table on the Case. I want to find out how many surveys we are sending/creating over a period of time, and need to only show surveys that were sent on cases where the Product Family was a specific value. I assume I need to create a Database View between the Case table and Survey table, but not sure how to configure the 'where clause'.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2023 04:27 PM
Hey,
Assuming the table is 'asmt_assessment_instance' logically you need to find a relationship between the 2 table you would like to find a relation and from what I can see it is the case on sn_customerservice_case and trigger id on asmt_assessment_instance. so you would join these fields in the where clause. so you could do it like below.
Hope it helps.
Thanks
Anks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2023 03:41 PM
Hi,
You can go here:
https://docs.servicenow.com/search?q=Create%20a%20database%20view
and review the documentation on creating a database view. You can also review existing OOB database views in your instance on how to relate records in different tables.
I don't have the 'ast_assessment_instance' table in my instance to review. I do find 'asmt_assessment_instance' table, that has Reference fields to other tables, and used in 'where' clauses.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2023 04:27 PM
Hey,
Assuming the table is 'asmt_assessment_instance' logically you need to find a relationship between the 2 table you would like to find a relation and from what I can see it is the case on sn_customerservice_case and trigger id on asmt_assessment_instance. so you would join these fields in the where clause. so you could do it like below.
Hope it helps.
Thanks
Anks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2023 06:35 PM
Fantastic. Thanks!