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.
Including a parameter in a preset is like applying a filter to the preset. You can add one or more parameters to a preset. The parameters are part of the SQL statement of the preset, and can be specified on the Parameters tab.
For example, you can add the 'Employee' parameter to select the data within a preset by employee code. When you open a form in which this preset is selected, you will be asked to specify the employee whose data you want to view. The default value shown can be changed, where necessary.
Another possible parameter would be the employee designated as the person responsible for production files. You could add the person responsible as a parameter for a preset used to retrieve production files. When you select the preset, you will be asked to specify the person responsible whose production files you want to view. The preset then only displays the production files for which the employee specified is responsible.
The use of parameters has a number of advantages. They allow you to make a more accurate selection of the data to be displayed. Also, the forms are opened more quickly, because only a subset of the data is retrieved.