Search empty/null fields

Hello,

I need to know how I can search for null values or empty fields…

Like example "version", I tried the commands "facts.myproject_version != ""
" and "not has facts.smartdesk_version" but doesn't work.

Anyone can help me?

tks

1 Like

7 years later… anyone know the answer to this?

Foreman uses a third party library to handle searching. Per its docs[1], null checks should be possible with null? and set?

[1] - GitHub - wvanbergen/scoped_search: Easily search you ActiveRecord models with a simple query language that converts to SQL.

2 Likes

Perfect! I’m ashamed to say I have read that page months ago but I’m glad that next time I search for answer here I’ll be able to find it!

Thank you sir!