SYSPRO Ribbon bar > Administration > Search Windows

Search Windows

SYSPRO Search Windows are customized panes that can be used as standalone search windows instead of the standard browse application.

You can link your search windows to the equivalent key field in SYSPRO so when you browse in a SYSPRO program, or press F9, the search window is displayed.

You can perform your search in the search window, and the results can be sent to the relevant program.

You access this program from (SYSPRO Ribbon bar->Administration->Customization->Search Windows).

Search Window

Column Description
Search window Indicates the caption for the search window.
Create Creates a customized search window for the selected search caption (key).
[Note]

A tick displayed in this column indicates that a search window for the caption already exists and is currently open or floating (auto hidden).

FieldDescription
Start SearchDisplay the search results in the Search Results listview.

The search is performed according to the criteria defined in the Search statement. If you did not specify a search statement, then all items are returned. For example, if you select Create against the Job search search window and immediately select Start Search, then all jobs are displayed in the Search Results listview.

Search Criteria 
Previous searchesThis lists the previous searches performed using this search window, providing you selected to save the search (i.e. you selected the Save this search option).
Delete (icon)Delete the search currently displayed at the Previous searches field.
Search criteria 
Search columnThis enables you to indicate the column on which you want to base a criteria for the search.

The available columns are displayed when you select the dropdown arrow at the Search column field.

For example, if you are doing a Job search, you could select the Search customer column to search on all jobs for a specific customer.

Search operatorIndicate the requirements for the Search column field you selected.
Search valueIndicate the value of the Search column field on which you want to base the search (i.e. the value that the Search column field must match to be included in the results).

You can use the wildcard characters * and ? in this field.

The contents of this field are added to the Search statement and then cleared when you select the Add Expression option.

You can use the SearchValue variable to change the Search value variable using VBScripting.

Search modifier 
AndAdd multiple criteria and you want to return results only for items where all criteria are true.
OrAdd multiple criteria and you want to return results for items where any of the criteria are true.
Add ExpressionAdd the Search criteria options you defined to the search Search statement. You need to select this option for each search criteria you define to construct the search statement.
Search information 
Search statementThis indicates all the criteria for the search. This statement is constructed by adding criteria and selecting the Add expression option.
DeleteDelete the criteria currently highlighted in the Statement field.
Start SearchProcess the search and display results in the Search Results listview.
Save this searchSave the search criteria for future use.

If you select this option, then after you select the Start Search function, the search is added to the Previous searches list and can be re-run when required.

Use for browsing Use the search window in a program whenever you press F9 (in a form, in a toolbar or in a data grid) or you select the equivalent browse button.
Apply system-wide

Use the search window as the preferred browser for all operators.

Ensure that you have enabled the Main Menu - Allow to create system-wide searchwindows security activity (Operators) to use this function.

Design

Design the layout of the search result listview for all operators.

The Remove Layout option is enabled only when there are pre-existing layouts available in the listview. If the administrator designs a new layout and applies it system-wide, then this layout is automatically applied. Any pre-existing layouts will still exist.

Custom columns can be added to the listview using the Customize option on the context sensitive menu in the listview.

Ensure that you have selected the Apply system-wide option to enable this field.

Search operators

Use these search operators to perform comparisons in your search:

Field Description
Equal to

This is used to perform exact comparisons. For example if the product class is equal to the string MB, then only stock codes with a product class of MB are displayed in the result.

If there is a product class of MBS, the items with this product class against them will not be included.

The search value must be provided in double quotes, for both alphanumeric and numeric values, for example ProductClass = "MB".

Is Not Equal To

This works in a similar way to the Equal to search operator except that it excludes the items that are matched from the returned results.

Greater Than

This is used to return items that have a value greater than the supplied search value. The comparison can be performed for numeric and alphanumeric values.

For example, the search statement QtyToMake > "1" will return all the jobs where the quantity to make is greater than 1.

Greater Than Or Equal To

This is used to find values that are either the same as the supplied search value, or greater than it.

For example, the search statement QtyToMake >= "1" will return all the jobs where the quantity to make is 1 or more.

Less Than

This is used to return items that have a value less than the supplied search value.

For example, the search statement QtyToMake < "10" will return all the jobs where the quantity to make is less than ten.

Less Than Or Equal To

This is used to find values that are either the same as the supplied search value, or less than it.

For example, the search statement QtyToMake <= "10" will return jobs with a quantity to make of 10.000 or less.

Contains

This is used to find rows that contain the supplied search value anywhere within the search column.

For example, the search statement Description LIKE "*cycle*" will return all stock codes that contain the string cycle anywhere within the stock description, in any combination of case.

This is similar to the Like operator in Transact SQL used by SQL Server.

Starts With

This is used to find rows that contain the supplied search value at the beginning of the search column.

For example, the search statement Description LIKE "biCYCLE*" will return all rows where the stock description starts with the string bicycle, in any combination of case.

This is similar to the Contains search operator, except that the string must appear at the very beginning of the field.

Sample usage

Assume you want to perform a search on all confirmed jobs for customer number 0000008:

  1. From the Search Windows screen, select Create on the Job Search line.

  2. Define the first Search criteria for the customer as follows:

    Column Customer
    Operator equal to
    Variable value 00000008
    Modifier And
  3. Select Add expression and define the search criteria for the non-stocked jobs as follows:

    Column ConfirmedFlag
    Operator equal to
    Variable value Y
    Modifier And
  4. Select Add expression.

  5. Select Start Search to display the jobs meeting the criteria.

VBScripting in Search Windows

A search window object is linked to a VBScript which handles the requests for the target table and the columns to be searched.

The VBScript uses the COMFND business object to return the XML results that populates the Search Results listview.

The VBScript code contains additional columns that have been commented out with an apostrophe. If you want to add one of the columns you just have to remove the apostrophe against both the listview configuration and the XML input to the business object.

If you need to add other fields from the same table that do not appear in the listview, you can add them to the VBScript.

Notes and warnings

Restrictions and limits

  • Only one instance of each type of search window can be created and hosted on the main menu.

Deletion considerations

  • Closing the search window deletes the customized pane (although the system prompts you first). This includes the search criteria and previous search information (i.e. a search window must remain open or floated if you want to reuse it with the same criteria or you want to perform one of the previous searches).

  • Although you cannot delete a search window if it has been defined at system-wide level, you can remove it by deselecting the Apply system-wide option.

    If the Apply system-wide option is removed by the administrator, the search window becomes a personal listview layout for each operator.

File and folder considerations

  • The list of available standard search windows is stored in the IMPSCH.IMP file. This file resides in the SYSPRO \Programs folder.

  • You can add a file called CUSSCH.IMP in which to add your own search windows. This file needs to be saved in the location defined in the IMPACT.INI against the CUSPRG= entry, or you need to specify the location if one doesn't exist.

System-wide considerations

  • Information for system-wide search windows is saved on the application server (\Base\Settings\SearchWindows.txt).

  • A system-wide layout is saved as SearchWindows_xx.XML on the application server (where xx is the two-character unique search window ID).

  • Any search windows specified in CUSSCH.IMP (user-defined search windows) can be defined for system-wide use.

Search expression considerations

  • When adding the first expression of a long search statement, or the only expression in the search statement, you select the Add Expression option to add this expression to the Search statement section of the pane.

    When adding a second or subsequent expression you must choose either the And or Or option from the dropdown list against the Search modifier field before selecting the Add Expression option to add this expression to the existing Search statement.

    If you know what must appear as the search statement you can manually enter it in the Search statement field.

Performance considerations

  • The more columns that are returned by the COMFND business object, the longer it will take to return the search results.

    The time taken is insignificant if the number of rows returned by the search is less than 500. However, when returning a large number of rows this can add up to many seconds.

  • You can add the NoXML element to the input XML for the business object to change its output to that of the listview's native data format.

    This significantly reduces the time that the listview takes to display when there are many thousands of rows, and lots of columns.

Activity considerations

Operator access to the following activities within this program can be restricted. You configure this using the Operators program.

Activity Description
Main Menu - Allow to create system-wide search windows Controls whether an operator can set Search windows to be available system-wide. This affects the availability of the Apply system-wide option in Search windows defined from the Main Menu (Administration) and in SYSPRO Reporting Services.