Note: If you open the Presets form from the Users form, only the presets specified for the selected user will be shown. If you open the form from the Technical basic data folder, all presets will be displayed. You can change these filters by choosing another preset on the form.
Use the Presets form to add or change a preset. To add or create presets, some knowledge of SQL is required.
After you have added a new preset, select Test preset from the Edit menu. Presets cannot be saved before they have been tested.
To activate a defined preset, open the form to which you want to apply the preset, for example the Parts form. If the preset selection field is not available, select Preset settings from the View menu. Then select the Show preset list box check box. You can now select the preset of your choice in the preset selection field.
Note: The SQL statement must in any case contain all mandatory form fields (column names). These mandatory fields can be found in the stored procedure, or in the 'Dynamic SQL' preset (if present).
Tip: Right-click in the text block to show the features available in the script editor. They allow you to save your preset on the server, apply markers, undo changes, and more.
Tip: The text block in which you enter the SQL statements has the same features as the form you use to add scripts. For example, you can press CTRL+SPACE BAR to display a list of all available SQL statements.
Presets have a wide range of applications. The exact applications depend on the queries, which you can build yourself using SQL statements. You can use the following statements:
SELECT statements
FROM statements
ORDER BY statements
WHERE statements
You can use a preset to add fields (columns) to the default selection displayed on the List tab. Using 'joins', you can even display fields (columns) from different tables on a single form.
For example, you could create a preset to display all lines, except for lines with a 'History' status, on a form. The resulting table selection (the result of your preset) can then be grouped using the Group feature.
Presets you create always have a number higher than 10,000. System presets have a number below 10,000. The first custom preset is therefore number 10,001.
Presets allow you to determine the structure of the Parts Explorer. By default, the part groups are displayed at the highest level, but you could also set Alias as the highest level, for instance.
The last selected preset is always saved. When you close and re-open a form, the form will be displayed according to the preset last applied to that form.
Presets are user-dependent. If a user logs on to the workstation while another user is already logged on, he will not see the first user's presets.
System presets cannot be changed or deleted. You can copy or change the SQL statement, and save it under a new preset code.
Parameters can be used in presets.
The SQL statement of the preset can include comment lines. Comments make it easier to read and maintain SQL statements. To add comments, use the following notation:
/* comment */
Note: When only a very limited number of records is displayed on a form, or if you do not see a record of which you are certain it exists, be sure to check whether a preset is applied to the form. Select View, and then select Preset settings. Select the Show preset list box check box. In the preset list box on the form, check which preset is active. To view the most extensive selection possible, choose Default selection.
When you use a parameter in a preset, you are effectively applying a filter to the preset. You can use one or more parameters in a preset. The parameters are part of the SQL statement of the preset, and you can specify them in more detail on the Parameters tab.
For example, you can add the parameter 'Employee' to be able to select an employee within the preset. When you open a form on which this preset is selected, you are prompted for the employee whose data you want to see. A default value is suggested automatically, but you can always choose a different value.
Tip: To see another employee's data, press CTRL+F5 to be prompted for the employee again.
You can also use parameters to select the employee responsible for particular production files. You can include the person responsible as a parameter for a preset used for retrieving production files. When you select the preset, you are first prompted for the person responsible whose files you want to see. You will then see only the production files for which the employee you specified is responsible.
The use of parameters has a number of advantages. They enable you to specify the data displayed on the form more precisely, and they allow the forms to open more quickly, because only a subset of the data has to be retrieved.