Searching for records in a 2007 custom Forms tool
This topic describes the three ways to search for items in a 2007 custom Forms tool.
Find
Find lets you search for the next or previous item in the current data view that contains specific text.
-
On the Home tab, click Find, and then click Find....
-
In the Find dialog box, enter the text you want to find.
-
Select options if you want to refine the search for case-sensitivity and/or whole word matching.
-
Click Find Next or Find Previous.
SharePoint Workspace finds the next or previous item that contains the specified text. If no match is found for the search text, SharePoint Workspace displays the message "No matches found for this search text." Note that the search always continues from the top or bottom of the list, depending on the direction in which you are searching.
Finding using Form
Find using Form lets you search for all items that match field values you enter in a form.
-
On the Home tab, click Find, and then click Find using Form.
-
Select the form to use for specifying search criteria from the drop-down list.
-
Select or enter search value in the available form fields.
Details
Note the following rules about selecting or entering values:
-
For fields in which you enter values, you can search using any part of the field value. For example, you can find all items that contain the name "Baker" by entering the search criteria "Bak".
-
Searches are NOT case-sensitive. For example, entering "Baker" as search criteria is the same as entering "baker".
Additionally, note that some search forms may include only fields referenced in the custom tool's view columns.
-
-
Select an option for how the search should use the specified criteria.
Select Any of the above field values to search using an "Or" logical operator, or All of the above field values to search using an "And" logical operator.
-
Click Search.
The data view lists only the items that match the criteria you specify. To restore the original data view, click Clear Search Results.
Note: You must clear the search results before starting another search.
Advanced Find
Advanced Find lets you search for and list all items that match one or more logical expressions.
-
On the Home tab, click Find and then click Advanced Find.
-
Check or uncheck forms you want to include or exclude in the search.
-
Add search expressions, as needed, to include or exclude items.
Search expressions test field values, and display items in the data view that match the conditions stated in the expression. You can add basic expressions or advanced expressions.
-
Click Search.
The data view lists only the items that match the conditions you specify. To restore the original data view, click click Clear Search Results.
Note: You must clear the search results before starting another search.
Adding a basic search expression
To add a basic expression, do the following:
-
Select the field for which you want to test values from the drop-down list.
Note the following details about fields in the list:
-
Date/Time fields are not supported in search expressions, and therefore do not appear in the drop-down list of fields.
-
Depending on the custom tool design, the list of fields may include only fields referenced in the tool's view columns.
-
-
Select an operator from the drop-down list.
The operators you see differ depending on the field type. Text-related fields provide operators that work with text strings, such as "contains", and "starts-with"; number-related fields provide comparison operators such as >, >=, <, and <=.
-
Enter the value you want to test for in the text box.
-
Click
In the following example, the search expression lists all items in which the value in the "City" field is "Warsaw".
Adding a basic search expression with multiple conditions
You may sometimes want to test for more than one condition. To do so, you can add an expression that contains logical operators. You can create an expression that lists items only if ALL conditions are met (logical AND operator), or if ANY conditions are met (logical OR operator).
-
Select All of the following conditions (logical AND) or Any of the following conditions (logical OR), depending on how you want to specify criteria for finding items.
-
Add each condition, one at a time.
In the following example, two expressions are added with the "Logical OR" option selected. The result will display all items in which the value in the "City" field is either "Warsaw" or "Krakow".
Updating a condition in an expression
To update a condition, do the following:
-
Select the condition you want to update in the expression display box.
The parts of the condition display in the drop-down lists and value text box.
-
Change any part of the condition.
-
Click
Removing a condition from an expression
To remove a condition from an expression, select it in the expression display box and click
Adding an advanced expression
Click to see options that enable you to further modify a search expression. You can create expressions that combine AND and OR logical operators, and group sets of conditions together.
Modify expressions as follows:
-
To change a logical operator, select the condition and click AND or OR.
-
To combine conditions so that they're interpreted as a whole in the expression, SHIFT-select them and click .
In the following example, the AccountNumber field and the City field conditions are combined such that the expression tests the values in each combined condition separately. In this case, all items are selected in which the value in the AccountNumber field is >=300 and <=400 AND the value in the City field is NOT Warsaw and NOT Krakow.
-
To uncombine a combined condition, SHIFT-select it and click
-
To move conditions in the expression display window, click or . This is especially useful when you want to move a condition to be part of a grouped set of conditions.
Adding an expression with the {UserName} variable
You can use the {UserName} variable to create a search that finds only items created by the current user. This variable must always be used together with the _CreatedByUrl field.
-
Select _CreatedByURL from the drop-down list of fields.
-
Select = as the variable.
-
Select {UserName} from the drop-down list of values.
-
Click . The filter expression displays in the filter expression box:
-
Click Search.
No comments:
Post a Comment