Searching with Multiple Criteria using AND statement?
Is there a way to change the behaviour for multiple Search Criteria in Windchill? Currently multiple criteria are treated with an OR statement (even though With All of These Criteria is set) But I would like to use multiple criteria with an AND statment. e.g. Search forFile Name equals 1003* or 1005* ANDFile Name does not equal *xx* or *yy* The search below in WC gives an error (search result size has exceeded the limit) because it treats both criteria with an OR statement and thus yield too many results with the second criteria: (... we are on Windchill Intralink 9.1 M050) Kind regards, Olaf Corten Olaf Corten CAD/PLM Manager Fico B.V. Ratio 6, Duiven Phone: +31 26 3196215 Mobile: +31 644548554 www.besi.com *** nov. 10th - PTC/USER Benelux Event 2010 -
Add the following property to the wt.properties file: com.ptc.windchill.search.client.overrideAndOrOperator=true Dominic Hand PLM Deployment & Support Leader Climate Solutions Ingersoll Rand 314 West 90th Street Minneapolis, MN 55420
Office +1.952.887.2247 Mobile +1.612.384.4366 Fax +1.866.806.9284
The Search Criteria table allows you to build detailed search queries by selecting specific searchable attributes and specifying the attribute values on which to search.
Note: Multiple values can be specified for attributes by adding the attribute to the table more than once. If you specify multiple values for a single attribute, there is an implicit OR relationship between the two values. For example, if you specify the Name attribute twice, with values of part* and gear*, your search returns results which match either of those values.
So, this wt.property setting switches it to an implicit AND relationship?
Olaf, where did you pick up the convention of delimiting multiple search criteria with a semicolon? I could not find that documented. This allows you to do ANDs and Ors now. Great work.
Yes, that is correct. The property below changes the advanced search behavior such that it treats multiple criteria for the same attribute with an AND relationship instead of the default OR relationship. This has been tested and implemented successfully in PDMLink 9.1 M040.
Great man, just what I was looking for. Will try it asap.
The semicolon was discovered by one of our users who just copied the Intralink 3,.4 functionality and tried in 9.1. BTW, The semicolon does not work in the Keyword field unfortunately. So the search below returns nothing:
Olaf Corten CAD/PLM Manager Fico B.V. Ratio 6, Duiven Phone: +31 26 3196215 Mobile: +31 644548554 www.besi.com
Name and number input fields searches only mastered objects I believe, where the regular keyword field when a name or number is used searches more objects regardless if fast search is installed or not. I guess PTC could chime in on that angle.