NetResults Tracker Knowledge Base Article
Using a NOT clause on a Release Number field excludes valid records from results
Article ID  351
Article Type  Error Troubleshooting
Product  NetResults Tracker
Oldest Version  6.0.0
Newest Version  6.0.1
Publication Date  01/30/2008 11:49:21 AM
Last Updated  11/12/2018 01:49:37 PM
Warnings
None
Description
This article provides information about a known issue in Versions 6.0.0 - 6.0.1 where use of a NOT clause on a Release Number field in an advanced query will result in some valid matches being excluded from the query results.

Let's say you have an advanced saved query with the clause "NOT Planned for Version = 1.2.*.*" where Planned for Version is a Release Number type field. The clause means you want all records that are not planned to be included in versions 1.2.0.0, 1.2.1.1, 1.2.1.2 and so on. Due to the known issue, a query with this type of NOT clause will exclude records that should be included in the query results. Using this example, a record with Planned for Version set to 1.3.0.0 will not be included in the results when it should. The reason is that the NOT clause is being applied to the each digit of the Release Number from left to right rather than the entire value as a whole. Upgrade to the latest version or use the workaround below to configure the advanced query to generate the desired results.

Workaround
To avoid this known issue, don't use a NOT clause on a Release Number type field. Instead, use a statement that includes all of the values you want. For example, if you wanted to use the clause "NOT Planned for Version = 1.2.*.*", use the following clauses instead. There is one clause of the format "value.*.*.*" for each of the possible values for the first digit of the Release Number except the one value you do not want ("1"). And, there is one clause of the format "1.value.*.*" for each of the possible values for the second digit except the one value you don't want ("2").:

AND (
Planned for = None.*.*.*
OR Planned for = 2.*.*.*
OR Planned for = 3.*.*.*
OR Planned for = 4.*.*.*
OR Planned for = 5.*.*.*
OR Planned for = 6.*.*.*
OR Planned for = 7.*.*.*
OR Planned for = 8.*.*.*
OR Planned for = 9.*.*.*
OR Planned for = 1.None.*.*
OR Planned for = 1.0.*.*
OR Planned for = 1.1.*.*
OR Planned for = 1.3.*.*
OR Planned for = 1.5.*.*
)

Information on editing advanced saved queries can be found in the Advanced Queries Help section.