Filtering records where two fields are different and include empty fields

Ivar Donado
Mega Sage

Hi,

I'm currently trying to make a report of computers where the assigned_to field and owned_by field are different. I know, you will probably think "Just use the 'is different' operator in the filters". The problem is that Servicenow had the great idea of not taking into account empty fields.

 

For example, if I have a computer where the assigned_to is Abraham Lincoln and the Owned by is empty, it won't show in the report when using "is different" as operator.

 

I tried creating a dynamic filter with addQuery(assigned_to,"!=",current.owned_by) but it didn't work.

I will try making something in PA for this, but there probably is a simpler way to make this.

 

Any ideas? 

1 ACCEPTED SOLUTION

Vaibhav127
Tera Guru

Hi Ivar Donado,

 

Along with your 'is different' condition add OR condition where assigned_to is not empty and the Owned by is empty

View solution in original post

1 REPLY 1

Vaibhav127
Tera Guru

Hi Ivar Donado,

 

Along with your 'is different' condition add OR condition where assigned_to is not empty and the Owned by is empty