Data Entry Definition

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.

The top section of the editor is simply the name and description of Data Entry Definition.  This section also contains a list of possible validation rules to choose from.
The next section "Update locations" contains a list of update locations the properties that can be set for each location
The bottom section contains a list of the entry fields.  When the "Entry Fields" checkbox is checked, the list reflects all the fields that will be displayed on the data entry form for editing.  When the "Unique Fields" checkbox is checked, the list of fields are replaced with the unique fields for the currently selected update location.

 

AdminDataEntry

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.

 

Field Editor

 

plus_24 - Add an entry field.

 

minus_24 - Remove an entry field.

 

arrow_up_blue_24 - Move an entry field up in the list.

 

arrow_down_blue_24 - 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.

String - A text value
WholeNumber - A numeric value with not decimal places.
DecimalNumber -
Date- Date
Time - Time field
Lookup - For fields that have lookup values.
IndexedPrimartStreet - Primary street. This control validates the street name entered.
IndexedCrossStreet - Nearest cross street prompt.
NodeNum -  Node ID
LargeLookup -
NextID -
YesNo - Yes No check box fields.
Label -  For display of a field as a label.
Annotation - Causes only the caption to display.

 

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.

Lookups=<DBFIELD> - Defines the lookup descriptions that will be displayed for the data entry field. Example Lookups=Weather would display the lookups for the Weather field.
LookupFormat=<Format> - Defines how the field should be displayed. Example LookupFormat=Value+Lookup - This will display the raw data value and the human readable value.
LookupSort=<Sort> - Defines the order that looked up values will be displayed. Example  LookupSort=NumberValue will display the list of values ordered by the raw data number.

AdminDataEntryFieldProperties

Example lookup for lightingcondition

 

Primary street field - Validates street names against the current streets.

IntersectionNormalizer=<Intersection Normalzer Name> - This property restricts the field to street names  returned from an intersection normalizer.  This property is used to validate streets in data entry. Example IntersectionNormalizer=MagicCity would restrict the field to only streets defined in the intersection normalizer named MagicCity.

 

Cross Street field - Provides a list

IntersectionNormalizer=<Intersection Normalzer Name> - This property restricts the field to street names  returned from an intersection normalizer. This property is used to validate streets in data entry. Example IntersectionNormalizer=MagicCity would restrict the field to only streets defined in the intersection normalizer named MagicCity.
RelatedPrimaryStreet=<Field name> - When used in conjunction with IntersectionNormalizer this property will limit a cross street field to only those defined by the IntersectionNormalizer and street name a user has selected. Example:

IntersectionNormalizer=MagicCity

RelatedPrimaryStreet=PrimaryStreet

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.

LookupQuery=<Query name> - Names the lookup query for nodes.
Lookups=<DBFIELD> - Defines the lookup descriptions that will be displayed for the data entry field.
LookupFormat=<Format>  - Defines how the field should be displayed. Example LookupFormat=Value+Lookup - This will display the raw data value and the name of the node.
LookupSort=<Sort> - Defines the order that looked up values will be displayed.
RelatedPrimaryStreet=<Field Name> - Name of the primary street field that will be used to search for the node.
RelatedCrossStreet=<Field Name> - Name of the cross street field that will be used to search for the node.
Map=
MapNodeZoom=
NodeLayer=
NodeIDField=<DBVALUE> - Field from the lookup query that uniquely identifies each node.

 

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

BuildDate(AccidentFormDate.Value,AccidentFormTime.Value)

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.