Hi Pete,
It turns out that "IS UNDEFINED" cannot be used in queries for attributes of objects other than the one being searched. In other words, "ProductSearch.PartNumber IS UNDEFINED" does not work in "FIND InventoryItem".
The task can be accomplished with a little workaround:
1) Add attribute PartNumberExclude of type Yes/No to object ProductSearch. Make sure the attribute is not shown on the ProductSearch form.
2) Add the following rule to ProductSearch:
If ProductSearch.PartNumber IS UNDEFINED Then ProductSearch.PartNumberExclude = 'Yes'
Else ProductSearch.PartNumberExclude = 'No'
3) Change your query like this:
FIND InventoryItem WHERE InventoryItem.ItemCategory='ROUTER BITS' AND
(InventoryItem.PartNumber=ProductSearch.PartNumber OR ProductSearch.PartNumberExclude = 'Yes')