SID-00423: Searching for empty fields in a query search
| Status: |
Unanswered |
TWiki version: |
4.3.1 |
Perl version: |
|
| Category: |
CategorySearch |
Server OS: |
|
Last update: |
16 years ago |
What is the best way (ie most robust, future proof, efficient, etc) of searching for topics with a form attached, where a specified field is blank?
The scenario is as follows. For whatever reason, I now want to check whether a certain field has been populated (is non blank) in all the topics that use a form. It may be that I have added a new field to the form, and want to monitor progress of data completion in that new field. So, I want to reliably find the ones that are still blank.
Say the form was called
TestForm, and I wanted to find all topics where a field on the form, say,
NewField was blank; A search using
QuerySearch is naturally where one would start. I can use a query like:
TestForm AND
NewField.name
which is TRUE for all topics that have the form and have the new field. This is a useful first step, eg. to find topics that don't yet have the new field (ie probably havent been updated since I added the new field). But to find the ones where the field exists but is not yet populated, what's the best way? The nearest I can get is:
TestForm AND
NewField.name AND (
NewField < ' ')
Is there a better way? (thanks for your attention)
--
GrahamWatson - 2009-07-16
Discussion and Answer
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
PeterThoeny - 2009-09-05
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.