Data Entry Definition (dataentrydefinition)
|Top Previous Next|
The Data Entry definition is used to define a data entry form. This form is used to map entry fields to a client database.
Sample data entry form. Update locations and fields will be different for each client.
Name - Name of the Data Entry definition. The main update location, that is the table with a one record per crash, that other tables hang off of. (usually crash, incident, environment, etc.) must be titled "Main".
Description - Description of the data entry definition.
Validation Rules - Specifies the name of the validation rules that will be used by the data entry form.
Viewer EXE - Expression that resolves to the name of the local program that can be used to open <Viewer File>. If this value is left blank, the windows system default viewer for <Viewer File> will be used. This field is intended for use when the default viewer is not the desired viewer, or additional parameters are desired.
Viewer File - Expression that resolves to the name of the scanned image / hardcopy for the crash. When loading a new record for editing, this value will be evaluated. If the resulting folder + file name exists on the disk, it will be opened for viewing along with the record. In some cases, when the expression can not be fully evaluated, the viewer will not be launched. (i.e. if the folder requires knowing the crash date, and the date hasn't been entered yet) In this situation, there is a "!" button on the data entry form. Pressing that button after entering the required data will re-evaluate the Viewer File and attempt to open the viewer again.
Some example expressions:
"c:\CrashRecords\" + AsString(Year(FormCrashDate.value),0 ) + "\" + CrashId.Value + ".pdf"
"\\Server12\CrashData\" + AsString(Year(FormCrashDate.value),0 ) + "\" + CrashId.Value + ".pdf"
"\\Server12\CrashData\" + CrashId.Value + ".tif"
The field names used in the examples above are specific to the data entry definition.
Update Location - This section specifies the tables that will be updated from the data entry form. A single collision record may create records in multiple tables. Each data entry form field contains an update location that specifies the table. A table can be specified multiple times. For example a single crash record may require several vehicle records be added to a vehicle table. One update location would then be added for each vehicle displayed on the data entry form.
Name - A name used to identify the update location. Each field displayed on a data entry form is tied to an update location.
Table Name - The schema and name of the table to be updated by the selected Update Location.
Connection - The name of a Crash Magic Online connection that will be used by the data entry form. This connection must have insert, update and delete privileges on all tables defined in the update locations.
Do Write - A Boolean expression that defines when the table specified by the update location will be updated. In this example the expression is (IsNull(FormUnit2Type.Value) .EQ. FALSE). This means that the table defined in Update location Unit2 will be updated when the form field Unit 2 Type is not blank. This field uses Crash Magic filter functions. The expression <Field Name>.Value is used to access a value entered in a form field.
Entry Fields - Allows editing of fields show in the data entry form.
Unique Fields - Allows the editing of unique fields for each Update location. Unique fields identify a unique record for an update location. For example a vehicle record may need the case Id and the vehicle number to identify the record as unique. These fields will be displayed in the data entry New Record and Edit Record tabs. In most case only the unique fields of the first update location will need to be visible. For example if the main crash record requires a case id field, and the vehicle records require the same case id number to tie the vehicle records to the crash record. In this case only the case id field for the main crash record should be displayed, and the case id field for the vehicle records will be hidden, but use the case id from the crash record would be specified in the expression for the fields.
- Add an entry field.
- Remove an entry field.
- Move an entry field up in the list.
- Move an entry field down in the list.
Entry Field Name - Name that will be used to identify the field on the form.
Visible - Determines if the field and caption for that field should be displayed on the data entry form.
Control Type - The type of field and prompt the field will provide. For example the Date prompt type will display a calendar selection prompt. The following is a list of possible prompt types.
Location (X, Y) - Sets the location of the field from the top left corner of the form. An omitted or 0 X value will cause the field to be placed below the previous Entry Field. An omitted or 0 value in the X and Y fields will cause the field to be placed below and aligned with the previous field.
Properties -Defines the properties for a field. The following is a list of properties for different types of fields.
Lookup fields - Defines a list of values to be displayed for a field.
Example lookup for lightingcondition
Primary street field - Validates street names against the current streets.
Cross Street field - Provides a list
In this example if a user entered Broadway into the PrimaryStreet form field, and then selected a field with the example properties, the data entry form would display the cross streets to Broadway as defined in the MagicCity normalizer.
Node fields - Node fields can select a node Id based on a street and cross street entered in previous fields, and display a map of the area.
Horiz. Anchor - The horizontal anchor point of the field. When left is specified the top left side of the field will be the Locaton (X, Y) coordinates. When center is specified the top center of the field will be the Locaton (X, Y) coordinates.
Width - Sets the with of the entry field. If left blank or 0 the field width will set to the default width for the control type specified.
Caption - This is the prompt that will be displayed next to the field on the form based on the Prompt settings position.
Position - Sets the position of the caption relative to the field. Selecting a value of None will hide the caption.
Value Settings - Sets the position that a looked up value will be displayed relative to the entry field.
Update Location - Sets the update location of the form field.
Read Only - When checked any value entered will not be written back to the database. This is used for labels and when the form field will be used to populate another form field.
Field name - The name of the database field that will be updated. This field name must be in the table of the update location.
Field Type - The database field data type.
Default - An expression that populates an empty field with a default value when the form displays.
Expression - An expression that sets the value of a database field when the record is saved. Example
This expression can be used to populate a single datetime field in a database by taking the date and time field from a data entry form.