Difference between revisions of "And Versus Or"

From IMSMA Wiki
Jump to: navigation, search
Line 1: Line 1:
 
Search definitions allow you to specify two different kinds of logical conditions. When you specify search criteria you may need all search criteria to be true in order for a record to be included in the search results. In this situation, the ALL condition indicates that each and every search criteria be true for a record to be included. If any of the criteria within the ALL node is false, the record will not be included in the search result. For example, the search definition shown in [[:Image:fig74.png|Figure 74]] requires that a hazard have a status equal to ''Open'' and a priority equal to ''High''. In this example, both conditions must be true in order for the hazard to be included in the result set.
 
Search definitions allow you to specify two different kinds of logical conditions. When you specify search criteria you may need all search criteria to be true in order for a record to be included in the search results. In this situation, the ALL condition indicates that each and every search criteria be true for a record to be included. If any of the criteria within the ALL node is false, the record will not be included in the search result. For example, the search definition shown in [[:Image:fig74.png|Figure 74]] requires that a hazard have a status equal to ''Open'' and a priority equal to ''High''. In this example, both conditions must be true in order for the hazard to be included in the result set.
  
[[Image:fig74.png|center|500px|''Figure 74. Example of a Search Using the ALL Condition'']]
+
[[Image:ExampleSearchUsingAllCondition.png|center|500px|''Example of a Search Using the ALL Condition'']]
 
<div align="center">
 
<div align="center">
''Figure 74. Example of a Search Using the ALL Condition''
+
''Example of a Search Using the ALL Condition''
 
</div>
 
</div>
  
 
In other situations, an item record may only need to satisfy one search criteria to be included in the search results. When this is the case, you should use the ANY search condition.  The ANY condition indicates that only one search criterion must be true.
 
In other situations, an item record may only need to satisfy one search criteria to be included in the search results. When this is the case, you should use the ANY search condition.  The ANY condition indicates that only one search criterion must be true.
  
[[Image:fig75.png|center|500px|''Figure 75. Example of a Search Using the ANY Condition'']]
+
[[Image:ExampleSearchUsingAnyCondition.png|center|500px|''Example of a Search Using the ANY Condition'']]
 
<div align="center">
 
<div align="center">
''Figure 75. Example of a Search Using the ANY Condition''
+
''Example of a Search Using the ANY Condition''
 
</div>
 
</div>
  
 
The ALL and ANY conditions group the search criteria within the group together. The search conditions can be nested within one another to create more complex search criteria.
 
The ALL and ANY conditions group the search criteria within the group together. The search conditions can be nested within one another to create more complex search criteria.

Revision as of 19:26, 27 February 2013

Search definitions allow you to specify two different kinds of logical conditions. When you specify search criteria you may need all search criteria to be true in order for a record to be included in the search results. In this situation, the ALL condition indicates that each and every search criteria be true for a record to be included. If any of the criteria within the ALL node is false, the record will not be included in the search result. For example, the search definition shown in Figure 74 requires that a hazard have a status equal to Open and a priority equal to High. In this example, both conditions must be true in order for the hazard to be included in the result set.

Example of a Search Using the ALL Condition

In other situations, an item record may only need to satisfy one search criteria to be included in the search results. When this is the case, you should use the ANY search condition. The ANY condition indicates that only one search criterion must be true.

Example of a Search Using the ANY Condition

The ALL and ANY conditions group the search criteria within the group together. The search conditions can be nested within one another to create more complex search criteria.