Stored procedures are subroutines, available to Inspect, that can be used to select data from, or make modifications to the database. When you create a database many stored procedures are provided.
For information on how to create a custom stored procedure refer to the user manual of the software product you use. This section just refers to naming conventions.
Never modify a standard stored procedure. If you wish to make changes, copy the stored procedure and save it with a new name starting with custom_.
For example create_new_unit would be copied as custom_create_new_unit.
Much of the information used by the stored procedures will be taken from the database. However, there will often be a need to use information about what's happening on the production line right now.
For example, if you are creating a new defect you may need to know the current unit ID so that the defect can be added to it.
This type of information is gathered using replaceable parameters. When running Data Collect these parameters will contain the actual values of each of the items described for the current inspection.
The list below contains all of the replaceable parameters that can be used in stored procedures.
[current_language_id]
[default_language_id]
[current_unit_serial]
[current_unit_identity1]
[current_unit_identity2]
[current_unit_identity3]
[current_unit_is_locked]
[current_unit_id]
[current_user_id]
[current_plant_id]
[current_plant_code]
[current_area_id]
[current_area_code]
[current_cell_id]
[current_cell_code]
[current_station_id]
[current_station_code]
[current_tracking_point_id]
[current_tracking_point_code]
[current_product_id]
[current_product_code]
[current_lot_id]
[current_lot_number]
[current_prod_date]
[current_shift_id]
[current_prod_hour]
[current_part_id]
[current_part_code]
[current_concern_id]
[current_concern_code]
[current_repair_type_id]
[current_repair_type_code]
[current_step_id]
Can we improve this topic?