PDA

View Full Version : Filtering searches from searches


vamp07
01-21-2005, 09:19 AM
I'm trying to create a search that looks for all items that contain a string x. That works great and I can save the search. I now want to filter out from that saved search any search items so that it does not find itself or other searches. Finding searches is a problem because as I arrow my way down through search results when I hit a search I loose my found items window and I'm back into some other search and or the search I just did. I tried saying:

and - template name - does not equal - Search

but that did not work. The attribute that all searches seems to have in common seems to be "template item" but that is not a choice. I also thought of using "Default Child Template" but that is not a choice either. I'm probably approaching this problem wrong. Any pointers would be appreciated.

xja
01-21-2005, 10:14 AM
You SHOULD be able to add a Criteria Row as follows:

(Item) is not Search

However, I have found that "(Item) is not" criteria has the same effect as "(Item) is", not just when the specified value is "Search" but for any value that I tried. Either that is a bug or I am doing something wrong.

xja
01-21-2005, 10:30 AM
Actually I tried the "(Item) is not Search" criteria without limiting it to bold item or siblings and it returned not only all Search items but also 3 template items (Contact, Document, and Text). Strange.

On a perhaps unrelated note, I added this Search as a child item, created the criteria (added and removed different criteria in the process of experimenting), then when I pressed Ctrl-Shift-Del to delete the Search item, I got the following error message:

"Error Saving item: Foreign Key Violation! FilterRow table references missing row in Item table."

The item was deleted however. I could not recreate the error.

kinook
01-21-2005, 11:48 AM
The 'is not' search problem is indeed a bug. For now, as a workaround, if you're using the default icon for all your searches, you could do a search where Icon does not equal <the search icon>.

We were also able to reproduce the second error mentioned when permanently deleting an advanced search item before it had been started or saved (the item is getting deleted, but the front-end is incorrectly trying to update the [now deleted] item). This error won't have any negative effects on your database.

vamp07
01-21-2005, 03:54 PM
Besides addressing the bug could you get so that all attributes are searchable and appear as a search choice? I'm thinking of things like "template item". I assume that is the name of the template and item inherits from? It just seemed weird that when I went to search I could not find and entry for every attribute item in the dB.

kinook
01-21-2005, 04:59 PM
Correct, the Template Item attribute is the template item an item is based on. The display of some attributes (in the Advanced Search list and the Item Attributes pane) is configured at Tools | Options | Attributes (some standard ones are not shown by default as to not unnecessarily clutter the display). Template Item is the only attribute that will never show up, since it is equivalent to an '(Item) is' search. We could include it in the list, but we don't currently because it was redundant.