Filtering contacts where a boolean field is null

I’m not sure if this is a bug or if I am doing this wrong but logically it doesn’t make sense to me.

  • No filter there are 12 contacts in my list.
  • opted_in:1 I have 2 contacts.
  • opted_in:0 I have 6 contacts.

The remaining 4 contacts are correctly the ones with nothing selected for the opted_in field.

  • opted_in:_ returns all 8 contacts with any value for opted_in
  • !opted_in:_ returns no contacts
  • !opted_in:1 only returns the 6 no contacts
  • !opted_in:0 only returns the 2 yes contacts
  • (!opted_in:0 !opted_in:1) returns 0 contacts
  • (opted_in:1 OR opted_in:0) returns 8 results
  • (!opted_in:1 AND !opted_in:0) returns 0 results
  • !(opted_in:1 OR opted_in:0) seems to spin and not finish, but if it actually does finish it’s returning 8 results

These no value contacts seem to be ignored whenever I try to filter on the opted_in parameter but appear when I filter on any other parameter.

Thanks,

If some value is empy, it will be picked up if you look for ‘empty’

For example you can have 3 kinds of status for visitors based on ‘date last active’

  1. Active in the past 30 days (date > -30 days)
  2. Active longer than 30 days ago (date < -30 Days)
  3. Never active (date active = empty)

In other words ‘no value’ is not zero.

I hope that helps
Joey

1 Like

Thanks for the reply I don’t fully understand what to filter for. In my scenario I want to do a quick filter at the top of the Contacts grid. I have a boolean field (1/0/null values), and I only want to return contacts with null values when I filter. How would I do this? How do I look for empty values in the top filter? I’ve tried every combination I can think of (even doing where not 0 and not 1, you would think that would return the empty values but it doesn’t).

It might just be the syntax for that filter that I’m missing, but I don’t know how to tell it to search for empty. I tried opted_in:null, opted_in:empty, opted_in: with a space after as well as all the combinations in my post above. None of these return the corresponding 4 contacts who have not selected yes or no yet for the opted_in field.

Note: This is the filter on the top right of the main contacts page where I’m trying to add these values.

Oh… in the contact grid? Then forget what I said, I was talking about the segment filter sorry.