Aloha,
My apologies if this is basic, but I’ve been unsuccessful with the documentation and forums…
What I’m trying to do
Output a table including a key that includes instances where the key is lacking a value.
I have a template with a "Next Step:: " key. When I query, I want to make sure I’m getting all my next steps into my table, even ones where I may not have assigned my next step…
I would like to be able to capture the notes that have the key, but are lacking a value. That way I can easily find where I’m missing next steps (or in the screenshot, where I’m missing testkeys)
In essence, DQL query are not able to distinguish between a non-existent field or a null value, as the other replies have shown. However, if you’re able to switch to dataviewjs you can detect where it has no value.
You’re still potentially going to run into issues related to upper- and lowercase character as long as you’re using field names with spaces, so be forewarned on that issue.
This version is not insensitive to the case of the field:
If you want a table to show both values and you want to keep using DQL, you need to pre-populate the field with a known null-value. Like defining it to some random value, which is not going to be used elsewise.
That is you could set it to “n/a” or “not defined” or even “-” would work. This will give it a value, and allow for your queries to include rows with that “empty” value for Next Step.
Such a workaround might need some extra logic, in case you want to present the next step if only it has a value, and so on. But it’ll show in the tables where you need to locate those without a proper next step.