Skip to main content
As a department manager I find myself constantly changing my filters. Is there a way to save filters settings to be used as a single click. for example see all new cases. or see all cases assigned to user xxxx or whatever.



Thanks
Hi zoldy,



there is an option to save all your filters by creating separate views, and adding static filters to those views.



If you are familiar with the SQL language, the simple query to retrieve the information from the Db looks like this:



SELECT (some fields) FROM (table_name) WHERE (some condition..)..



e.g. select * from service_req where responsibility='john.doe@mycomany.com'



The static filter is basically that 'Where' clause.



In order to test the filters, please create a temporary admin (with full permissions), log in with that admin, create a new list view (Customize - Lists - type a name for the new view), and only then place filters on the created view. If the view gets corrupted (due to the wrong filter), you can either customize the view again (the button would still appear), or log out, log back in with your admin and remove the corrupt view.



Here are some of the examples of static filters (of course you can create many more depending on the information you want to pull):



all active tickets for the logged in admin

status in (OPEN_CLASSES) AND responsibility='$LoginUserName$'



not assigned tickets:

(responsibility is null OR responsibility = 'none')



show active tickets where due date older than today

status in (OPEN_CLASSES) AND cast((due_date) as date) < current_date



show tickets closed within last week (MySQL)

select id, close_time from service_req where close_time BETWEEN CURDATE()-INTERVAL 1 week AND CURDATE()+interval 1 day;



show last month's tickets (MSSQL, NOT FOR CLOUD )

datepart(yy,insert_time) = datepart(yy,dateadd(m,-1,getdate())) and datepart(m,insert_time) = datepart(m,dateadd(m,-1,getdate()))



Please note, that the syntax depends on the database type; in Cloud we use MySQL, so you might need to adjust some filters according to the proper SQL syntax.



If you need any specific filter, please describe what you would like to achieve, and we will help you with the exact filter code.



Regards,

Slava
I have been struggling to find the exact filter code for a view I am trying to create. My current static filter is as follows:



This filter shows me all open tickets assigned to the logged in user and any unassigned tickets and excludes status group 5 (Pending):

status in (OPEN_CLASSES) AND status <> (5) AND (responsibility is null OR responsibility='none'

OR responsibility='$LoginUserName$')



What I would like to do is have a system view where I still see all open tickets assigned to the logged in user and any unassigned tickets but this time include tickets in group 5 that are due within the next 7 days.



I tried this filter but it didn't bring in group 5 tickets with a due date within the next 7 days?



status in (OPEN_CLASSES) AND status <> (5) AND (responsibility is null OR responsibility='none' OR responsibility='$LoginUserName$') OR (status = (5) AND due_date BETWEEN CURDATE() AND CURDATE() - INTERVAL 7 DAY)



Any ideas?

Reply