Tuesday, March 7, 2017

Searching for records in a 2007 custom Forms tool

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

Finding using Form

Advanced Find

Find

Find lets you search for the next or previous item in the current data view that contains specific text.

  1. On the Home tab, click Find, and then click Find....

  2. In the Find dialog box, enter the text you want to find.

  3. Select options if you want to refine the search for case-sensitivity and/or whole word matching.

  4. 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.

Top of Page

Finding using Form

Find using Form lets you search for all items that match field values you enter in a form.

  1. On the Home tab, click Find, and then click Find using Form.

  2. Select the form to use for specifying search criteria from the drop-down list.

  3. 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.

  4. 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.

  5. 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.

Top of Page

Advanced Find

Advanced Find lets you search for and list all items that match one or more logical expressions.

  1. On the Home tab, click Find and then click Advanced Find.

  2. Check or uncheck forms you want to include or exclude in the search.

  3. 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.

  4. 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:

  1. 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.

  2. 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 <=.

  3. Enter the value you want to test for in the text box.

  4. Click Add condition icon

In the following example, the search expression lists all items in which the value in the "City" field is "Warsaw".

Simple search expression

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).

  1. 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.

  2. 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".

Basic search expression with logical OR

Updating a condition in an expression

To update a condition, do the following:

  1. 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.

  2. Change any part of the condition.

  3. Click Update condition icon

Removing a condition from an expression

To remove a condition from an expression, select it in the expression display box and click Remove condition icon

Adding an advanced expression

Click Advanced options icon 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 Combine condition icon .

    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.

    Sample complex search expression

  • To uncombine a combined condition, SHIFT-select it and click Uncombine conditions icon

  • To move conditions in the expression display window, click Move up icon or Move down icon . 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.

  1. Select _CreatedByURL from the drop-down list of fields.

  2. Select = as the variable.

  3. Select {UserName} from the drop-down list of values.

  4. Click Add condition icon . The filter expression displays in the filter expression box:

    Sample {UserName} expression

  5. Click Search.

Top of Page

No comments:

Post a Comment