I’m trying to select documents from a Notes database for display in a view. Using
SELECT @All
shows all the documents, as it should; if I create a column showing the Form field, I get the document type shown in that column, also as it should. I can see that there are several documents with this field set to Task.
Now I wish to select all Task documents:
SELECT (Form = "Task")
The result set is empty, which is not quite what I’d expected, especially as the inverse statements
SELECT (Form != "Task")
and
SELECT (!(Form = "Task"))
indeed return all documents except for those of Task type.
What could be the reason for this?
It is likely the case that the Task documents are “response” documents. In that case you need to change the view’s property that shows response documents in a hierarchy.
Or you can select the parent documents as well and include descendants. For instance, say the Project documents are the parent type, and Task documents are the responses (i.e. child docs). Then your selection formula would be:
Another trick to make sure your query is correct is to select one of the documents in a view (a view with the Select @ALL selection formula, of course), and then click File > Document > Properties. Then you can see every item in that document, including the Form item. Check its value to make sure it is set to “Task” and not something else. It’s a reach, but just thinking there could be a hidden character there, so if it shows up as “Task ” in that properties dialog you’d know why the selection formula failed.