- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2017 10:29 AM
Hi all,
I've never created a Database View before, so bear with me.
I have some record producers that create 'u_private_incidents' and have many variables containing useful data.
The goal is to be able to create reports on these variables, without having to physically create/populate fields on the Incident record.
I found the following thread: Re: Reporting on Variables
So I know:
1 - The record producers store their values in the Question_Answer table & the 'table_sys_id' field matches the 'sys_id' of the corresponding 'u_private_incident' record.
2 - The variables themselves are stored in the Variable[item_option_new] table.
3 - Database views make it possible to link multiple tables for reporting purposes.
I've attempted many combinations of 'Where clauses' and just can't seem to get anything from the "try it" button. So i figured it's time to ask for some help.
Hopefully it's something simple I've not quite grasped.
Solved! Go to Solution.
- Labels:
-
Reporting

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2017 11:11 AM
Hi Lee,
You need to use item_option_new (Variable table). In order to get what you want you can use something as below
For testing I have taken Facilities_request table you can use u_private_incident table. Rest order, where clause remain the same.
Once done create a report on database view that was created with below columns & you get what is expected
If required you can then group the report by using Group by -- Number.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2017 11:11 AM
Hi Lee,
You need to use item_option_new (Variable table). In order to get what you want you can use something as below
For testing I have taken Facilities_request table you can use u_private_incident table. Rest order, where clause remain the same.
Once done create a report on database view that was created with below columns & you get what is expected
If required you can then group the report by using Group by -- Number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2017 01:46 AM
This was what I was looking for, thanks Jaspal!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2017 11:17 AM
Try this .
inc_sys_id=qst_table_sys_id
qst_question=var_sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2017 01:48 AM
I was able to connect the variable table & filter out Variable Type's in my report thanks to the 'qst_question=var_sys_id' which clause.
Thanks Deepak!