The Browser tab under Document is where you define the SQL statements and the fields that will build the StarShip browser. In StarShip, the user can enter the document key, or browse for a document using filters in the Search/Batch Processing window. This window appears when the user clicks on the magnifying glass next to the Source document field in StarShip.
For SQL field descriptions, see Define SQL.
On the Documents > Browser tab, enter one or more SQL queries, and then add the fields that will display in the Search/Batch window. For more information about the Fields List section, see Define Fields.
Using Orders in the example below, we add a SQL Query to bring in the Order header information. We then add the field "Order Number" to the Fields List. Continue adding fields for every field you want to be available in the Search/Batch window, or that you want to use in a SQL statement. After adding all of your fields, select the field that is the Document Key at the top of the Browser tab.
The Document Key is the field the user would enter to load the source document directly. Typically, this is an Order Number, Invoice Number, Customer Number, etc. It is an input to all of the SQL statements that are used to retrieve the document from the database (i.e. Header, Line Items, etc.).
A “Document Key” must be identified for each document that is defined on the Documents tab. This field is used to store the “key” field data that identifies the record for the document type. It may be the order number for an Order document, it might be a Customer ID for a Customer document, etc.. The field value will be stored in the internal {Header.Document Key} field, and is used to filter records returned from the database via the Key Provider SQL in the Header tab. This field can also be used by any other SQL for the document being defined that needs to reference this “key” data. The field will have this value whether it comes from selecting the record in the StarShip browse window, scanning it from barcode, or manually typing it in.
While it is not necessary for the StarShip user to use the Search/Batch window, it is necessary to have at least one simple SQL that selects the field to be identified as the “Document Key.” Without it, you will not be able to make a selection from this field, and a selection is required.
Before selecting the field for the Document Key, you must add the SQL query and then add fields to the Fields List. The Document Key field will be then be populated from the Fields List.
The Search/Batch Processing window supports loading and browsing multiple source documents with the ability to filter search results. In the Field List and Details section, you can view, add, or delete fields from the source interface that will be used in the Search/Batch window. The Define Fields topic has complete information about how to configure each of the fields in this section. Here are some notes that pertain specifically to how these fields relate to the Search/Batch window.
The data type affects the options that are available for filtering results in the Search/Batch window. For example, the IsDateTime data type can be used to filter by date in the Search/Batch window.
This is a list of data types and filtering options :
Data Type |
Options |
Does Not Allow |
IsDateTime |
Today, Yesterday, Past Week, Past Month; also gives the range "From" and "To" |
--- |
IsNumeric |
From, Until, Equals, Does Not Equal |
Contains, Begins With |
IsString |
Contains, Begins With, Equals, Does Not Equal |
From, Until |
IsEmail |
N/A |
--- |
More about the Field Data Type...
Check this box if you want this field to appear in the Search/Batch window. Uncheck this box if you want to use the value of this field within other queries defined on the Browser tab.
Enable the "Has Value List" check box to allow users to filter results in the Search/Batch window by checking a check box next to a list of values under Filters.
Any field you define on the Browser tab is available for filtering. When you add a filter for a field that has a value list linked to it, the values will be listed as check boxes. As the user applies the filter in the Search/Batch window in StarShip, only records with the selected values in those fields will appear in the search results.
You create value lists on the Value Lists tab in SQL Builder. Once created, you will be able to assign value lists to Browser fields by selecting them from the Value List ID drop-down field.
Note : Filters are applied on the Server side. Any SQL queries you add on the Browser tab will be re-run, the filters applied, and then results are pushed to the StarShip Client.
This field is only available on the Browser tab. You can name the field something different than the Field ID to control how the field displays in the Search/Batch window.
'Order By" Clause
The background mechanism used to add a filter to the browse query forces a limitation where you cannot use an 'order by' clause in your query.
If you must use an 'order by' clause in your query, the older, more limited version of the Search/Batch window will be used. The older Search window does not support applying filters on the Server side (see Note), or batch importing source documents.
When an order clause is present, SQL Builder displays a warning message about this limitation.
Nested/Sub-queries
If nested/sub-queries are not supported by your data provider, the older Search/Batch window will also be used.
For more information about the Search/Batch Processing window and Filters in the StarShip Client, see the StarShip Help.