Filtering cases in Advanced Mode



what filters to apply to get the cases where the latest email associated with case apart from system emails is a incoming mail.


I have tried following filters. It is not giving expected results.

Like 0



Hi Nagaraju,

Could you try to filter by Case.Activity.Email message? 

Hi Vladimir,


Thanks for Reply. It is also not giving the required result. I need to filter out the latest Email(excluding system Emails) and check whether It is incoming or outgoing.

This way I will get all the cases which are not responded by Email.

Hi Nagaraju,


I'm afraid that there are not OOB option to filter cases based on Your need.

As a workaround i may propose following solution:

- create db view (you can generate complex sql script to display only cases that last email was incoming) and next create view object (Represent Structure of DB View) based on it

- use this view object inside advanced filter (eg. by operator exists)




Doesn't the status of the Case usually change when an incoming Email comes in? It could be best to filter by that status

Hi Marcin,


Thanks for Reply. It is possible to create a view object to get the cases where latest email is incoming. Could you als0 provide a way to use this view object in Cases Section filters?

We can only filter the objects that have relationships.

Hi Julius,


I think it only changes for first response. There could be many to and fro mails for a case. My objective is to alert user that he has to respond to customer for a particular case.


Hi Nagaraju,


First You have to build sql like example. Important is to expose all required system columns and one which will be guid of object (to have relation)

select distinct	a."Id", a."CreatedOn",a."CreatedById",a."ModifiedOn",a."ModifiedById",a."ProcessListeners",
a."AccountId" as "UserAccountId"
from "Activity" a
left join "Activity" b on 
	a."AccountId"=b."AccountId" and 
	a."Id"<>b."Id"  and 
	b."CreatedOn">a."CreatedOn" and
	b."AccountId" is not null
	and b."Id" is null

Next create new view object with the same name as a db view, mark checkbox that this is view object, select Base Object as a parent and add new lookup column eg. UsrAccount (this column will give You possibility to use this object as in filter).


Ps. You have to replace Account to Case in my example to adopt it to Your need.


Best regards,


Show all comments