Query for or status

Hello
I have field as ‘closed_at’ in my model, and trying to make query for searching data based on status

  • return data which is earlier than ‘closed_at’
  • also return if there is no value in ‘closed_at’

I can make each of them as(based on PHP):

  • where(‘fields.closed_at[exists]’, ‘false’)
  • where(‘fields.closed_at[gt]’, date(‘Y-m-d H:i:s’))

but cannot make these 2 status as ‘or’. Does someone knows about it?

Hi @jung,

Could you clarify how exactly you’re using this closed_at field that you’ve created?

Usually, our customers will use our publishing and updating metadata properties to actually find out the status of each item.

@gabriel thanks for reply!

I’m trying to use closed_at to make content like archived state, so want to not show when it is in closed(similar as archived) state.

Thanks.