Database View Syntax for where clause
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2014 12:31 PM
I want to filter a database view so that the output is only certain values in the view. For example, on the task table, I want task to be of certain task type or certain states (tsk_sys_class_name = 'sc_request' AND tsk_state = '1')
but nothing I do seems to work.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2014 10:05 AM
Hello,
I'm trying to do the same thing. Nothing filters the view to on the records based on the where clause. Did you ever get it to work?
Thanks
Jana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2014 08:35 AM
Hi Dave,
I'm facing the same issue here, Have you figured out yours?
Regards,
Rodrigo Higa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2014 05:48 AM
Hello,
I arrived here looking for the same issue. In case that this may help somebody in the future: in my case the problem was the order.
The syntax is as simple as:
(a_tablename = 'incident' && a_fieldname = 'assignment_group')
but I had to increase the order of the 'View Table' from 100 to 900 for this filtering clause to apply correctly and not to show the whole list.
This was due to the fact that the other table used in this View was marked as Left Join, though.
Regards,
Miguel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2014 04:05 PM
The database view does not know about this condition: tsk_state = '1'
You need to add sys_choice table, place some WHeRE Clause like this > assuming your variable prefix for this table is ch:
(ch_name = 'task' && ch_value = 1 && ch_element = 'state')
Then add your table: task and apply this Where Clause > asusming your variable prefix for this is tsk:
tsk_state = ch_value
This did the trick for a similar problem I had, and I hope it can help.
M