In this Topic Hide
1. Create Stored Procedure for Unit Creation
2. Create the Create Unit Form
3. Add Generic Controls to Form
To use this form the station property On commit must be set to Prompt. For further information see here.
The Create Unit form allows you to add a unit to the system based on information that you enter or select. This could include details such as the serial number, color or build group.
The form can include check boxes, combo boxes, list boxes that are populated with data from the database. You can then make a selection from that list.
Alternatively, or in addition, it can contain a text box where you can enter a customized value.
In order to insert a new unit in the database you will need to use a stored procedure. As with all customised stored procedures it must start with the prefix _custom. For example custom_create_new_unit.
The stored procedure will be different for every plant but you may be
able to save time by starting with this
example.
The Create Unit form sends a value to the custom_create_new_unit stored procedure which then creates a new unit in the database. It also sets the new unit as the current unit so that it can be viewed in the Main screen.
In order to know what type of unit needs to be created at least one value must be entered or selected in the form. These values are entered, manually or automatically, using Generic controls.
If you want the operator to select from a list populated from existing database values you must use the Checkbox, Combobox or Listbox control. If you want the operator to enter a value manually you must use the TextEdit control.
The output of these controls will be passed to the Create Unit form which will use them to create a unit using the stored procedure.
For more information on populating generic controls see here.
You now have everything you need to enable the stored procedure to create a new unit in the database.
1. Select the form.
2. In the Properties
pane click the edit button ()
next to OnAcceptStoredProcedure.
3. Select the required stored procedure from the drop-down list.
The Parameters pane lists the parameters that are required by and returned by the stored procedure. If Is Output is enabled for a parameter then that parameter will be returned to the Main form. In this instance this will usually be the Unit ID. This means that the newly created unit will be displayed to the operator.
4. Select the first parameter that has Is Output disabled. The Properties tab updates.
5. Select the Parameter Type. This can be one of the following:
o Value: A static value that will always be used by the stored procedure. This requires a number type and the value that will be used.
o Component: Uses the output (Value Member) from one of the controls in the form. This is selected from the Component drop-down list which gives the names of the available controls.
o Variable: Contains global variables from the database. This includes any variable relating to the unit, the station or the user. This requires the Variable Path to be specified.
6. Enter the details required for the parameter type.
7. Repeat for all of the required input parameters.
8. Select each of the input parameters and ensure that the Type property (e.g. System.Int32) is correctly set.
9. Click OK.
The form is now ready to use.
The Create Unit form is accessed from the Main screen by clicking on the Commit button on the Go to unit control.
The form will open and you can enter the required details.
When you click OK the unit will be created and selected at the station.
To use this form the station property On commit must be set to Prompt. For further information see here.
Control |
Used to perform this action |
Generic Checkbox |
Enable or disable option. |
Generic Combobox |
Choose option from a drop-down list. |
Generic Listbox |
Choose from list of options. |
Generic TextEdit |
Manually enter value. Can also be populated automatically.e.g. using a barcode scanner. |
|
Use selected root cause. |
|
Cancel root cause selection. |
Control | Used to perform this action |
Audit - Info Panel | Displays multiple audit properties in a grid. Select Choose
properties![]() |
Audit Info | Displays the value of an audit property. Select Choose
column![]() |
Change Password Control | User can change password by entering the current password and then entering the new password. |
Checklist Control | Displays checklist questions for the current step together with possible answers, comments and reference documents. |
Current Unit Defects Grid | Lists the defects associated to the unit that is being viewed. |
Custom Defects Grid | Lists part/concern/repair shortcuts specified by user. |
Date Label | Displays the current date |
Defect-Info Grid | Contains additional information to that displayed in the Overview window, including recording area/cell, repair area/cell, responsible area/cell and any associated images. |
Defect Control | Displays the views, view categories and part categories into which defects can be placed. |
Generic Checkbox | Enable or disable option. |
Generic Combobox | Select one or more options. |
Generic Date Picker | Select a date. |
Generic Grid | A customized table of information. |
Generic ListBox | Select from a customized list. |
Generic TextEdit | Custom data entry box. |
Goto Generic Form Button | Click to go to a specified Generic form. |
Goto Unit Button | Select identity type, enter identity number and click to go to selected unit. |
Group Control | Allows components to be grouped together in the form. When the group control is moved all the components it contains will also be moved. |
Last Defects Grid | Lists the most recently entered defects. |
Overview Control | Contains the defects related to the current unit and allows you to perform several actions on the defects and repairs. |
Picture | Displays an image. Can be used to add a logo to the form. |
Print Ticket Button | Click to print a travel ticket. |
Product Document Control | Lists documents associated to the currently selected product. |
Question Document Control | Lists documents associated to the currently selected question. |
Repair - Info Grid | Displays repair information. |
Report Viewer | Displays a customizable![]() |
Select Printer Button | Open the Select Printer form. |
Shell Button | Runs a command line script to carry out actions outside Data Collect (e.g. open files, run applications). |
Shift Info | Displays the current shift. |
Static Label | Displays customizable text. can be used to add extra information to the form. |
Station - Info Grid | Lists available stations that can be selected. |
Station Info | Displays the station that is being used. |
Tab Control | Customizable tab control. Allows more than one set of information to be displayed in the same area of the form. They can be switched between by selecting the required tab. |
Time Label | Displays the current time. |
Top Concerns Grid | Lists the most common concerns at the station. |
Top Defects Grid | Lists the most common defects at the station. |
Unit - Info Grid | Displays information about the current unit. |
Unit Color Grid | Lists the colors associated to the current unit. |
Unit Info | Displays the ID of the current unit. |
Unit List Grid | Displays a list of the units in the production line. The current unit is shown in the middle and highlighted. The units that have already passed through are below, and those yet to come are above. If a unit has passed through more than once only the latest pass will be shown. |
Unit Lookup Code Grid | Lists the lookup codes associated to the current unit. |
Use Defect Source Check Button | Specify whether the defects shown on travel tickets were entered at this station or at all stations. |
User - Info Grid | Displays information about the current user. |
User Info | Displays the name of the current user. |
User Picture | Displays a picture of the current user. |
Web Browser | Displays a web browser window. Useful for displaying online help. |