Filter using section (retrieve records)
The purpose of the Filter Using section is to specify filter conditions that will be used to filter the retrieved records. A filter condition is something about a retrieved record that can be either true or false. This task's computation will only use retrieved records for which all the filter conditions are true. If any filter conditions are false for a retrieved record, the retrieved record is discarded and not used.
To add a filter condition to the Filter Using section, click the Add Filter action on the Filter Using section bar. Once you have added filter conditions to the Filter Using section, you will see a check box for each filter condition. To remove a filter condition from the Filter Using section, check the filter condition's check box and click the Delete Filter action on the section bar.
When you click the Add Filter action on the Filter Using section bar, a Task Filter window pops up so you can specify the details of a filter condition. When you click the link in the filter condition's Left Side Data field a Filter Window pops up to allow you to modify the details of an existing filter condition.
A Task Filter window has two sections. The purpose of the Left Side Data section is to specify how retrieved records will be used in the filter condition. The purpose of the Right Side Data section is to specify what the retrieved records will be compared to.
When the List check box in the Left Side Data section is not checked, it means that the value of a field in each retrieved record will be compared to one other value. The field in the retrieved records to use for the comparison is specified by the Section Name and Field Name fields.
- Equals
- Not Equals
- Less Than
- Less Than or Equals
- More Than
- More Than or Equals
- Contains
- Contains - Case Sensitive
- Start With
- Start With - Case Sensitive
- End With
- End With - Case Sensitive
- Before
- After
- In
- Not In
- Does Not Contain
- Does Not Contain - Case Sensitive
At the end of this section, we will explain what each of these comparisons are for.
The value to compare the Left Side Data to is specified by the Right Side Data section. The three radio buttons at the top of the Right Side Data section determine which of three places the value will come from. Fields underneath the three radio buttons provide additional details about the value.
If the Source radio button is selected, the other value will come from a record specified by the Filter Record section of the Retrieve Records task properties. It will use the field in the record specified by the Section Name and Field Name fields of the Right Side Data section. If the Target radio button is selected, then the other value for the comparison will come from the field of the retrieved record specified by the Section Name and Field Name fields of the Right Side Data section.
If the source or target is a list of records, one of the records in the list will be chosen to do the comparison. Instead, ensure the source or target for filtering is a single record when the List property is not checked.
If the Constant radio button is selected, then the Section Name and Field Name fields of the Right Side Data section are not visible. Instead, there is another field labeled Value where you can type the actual other value to be used for the comparison. If you are checking to see if the field is empty, compare it to a constant value of Null.
When the List check box in the Left Side Data section is checked it means that the set of retrieved records will be compared to the set of records specified by the Filter Using section of the Retrieve Records task's properties form. Since you are comparing lists of records, both the From Records and the Filter records should be created from the same module.
The comparison to use is specified by the value of the Operator field. The Operator field is a drop-down list that allows you to choose from the following values: In or Not In.
Check the List check box in the Right Side Data section.
- Equals, Not Equals
These are useful for comparing individual values. If both values are the same, then Equals is true. If the values are different then Not Equals is true.
To test for the existence of a date value, use Equals or Not Equals for the operator and Null for the value; do not use More Than or Less Than zero to test for the existence of a date value.
- Less Than, Less Than or Equals, More Than, More Than or Equals
These are used to compare individual number values. Less Than is true if the value specified by the Left Side Data section is less than the value specified by the Right Side Data section. The rest of these comparisons work in a similar way.
To test for the existence of a date value, use Equals or Not Equals for the operator and Null for the value; do not use More Than or Less Than zero to test for the existence of a date value.
- Contains, Start With, End With, Does Not Contain
These are used to compare individual text values. Contains is true if the text value specified by the Left Side Data section contains the text value specified by the Right Side Data section. For example, abcdefg contains bcd; abcdefg does not contain bug.
Start With is true if the text value specified by the Left Side Data section starts with the text value specified by the Right Side Data section. For example abcdefg starts with abcd; abcdefg does not start with xyz.
End With is true if the text value specified by the Left Side Data section ends with the text value specified by the Right Side Data section. For example abcdefg ends with fg; abcdefg does not end with abc.
Does Not Contain is true if the text value specified by the Left Side Data section does not contain the text value specified by the Right Side Data section. For example, abcdefg contains bcd; abcdefg does not contain bug.
Contains, Start With, End With, and Does Not Contain are not case sensitive. Contains - Case Sensitive, Start With - Case Sensitive, End With - Case Sensitive, and Does Not Contain - Case Sensitive are case sensitive.
- Before, After
- These are used to compare individual date, time and date and time values. Before is true if the value specified by the Left Side Data section is before the value specified by the Right Side Data section. After is true if the value specified by the Left Side Data section is after the value specified by the Right Side Data section.
- In, Not In
These are used to compare sets of records. These are the only comparisons that should be used if the List check box is checked. If the List check box is not checked then one of the other comparison operations should be used.
In is true for retrieved records that are in the set of records specified by the Filter Records section of the Retrieve Records task's properties form. Not In is true for retrieved records that are not in the set of records specified by the Filter Records section.
After you click OK on the Task Filter, the platform displays the task filter in the Filter Using section.
To remove a task filter from the list in the Filter Using section, select the check box next to a filter and click Delete Filter.