Using Database View with Survey / Question Banks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2023 01:00 PM
I'm having some difficulty creating a Database View for surveys. Below are the requirements, screenshots of the database view I created, and the challenges I'm facing.
Requirements:
- Each survey result per INC is in one row.
- Each question (from Question Bank) is in one column.
- Only Completed surveys should be in the report. (This is ok if we have to filter them out later.
- Multiple surveys are needed due to trigger conditions.
- 5 questions/response options are same across all surveys.
- 2 questions are the same across all surveys but the response options are different.
Challenges:
We are using Question Bank for all the survey questions and those questions hold all the response options. We created (4) surveys based on trigger conditions. In survey designer, we pulled in the Questions from the Question Banks and for two questions removed some of the response options. However, this created different sys_ids for every question (to be different than the Question Bank question sys_id). Therefore, in the database view I am referencing only one survey sys_id to one question sys_id. I attempted to add another join referencing the sys_id of a 2nd survey and the sys_id of it’s question, but the database view was completely blank. Can I only add joins for one survey in particular? Even that method would result in having 4 different columns for the same questions (for each survey). Is there a different way we can handle this to get the report to meet the requirements?
- 843 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2024 11:27 AM
Ever solved this? 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2024 12:14 PM
No, it did not. I had to do one Database View of question/responses per survey.
The downside was I could not have all the data together for the questions/responses that are common across the different surveys.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 08:21 AM - edited 10-29-2024 08:21 AM
This Video explains how to create Database View!
You will need to make a couple of Joins, but you will transform the Rows into Columns 🙂
I just tried it and it works, but I used "_" character in the "Where Clause" instead of a "." as in the Video!
https://www.servicenow.com/community/performance-analytics-blog/simplifying-reporting-on-surveys/ba-...