Single CRUD (XF200)

The type for functions to create/read/update/delete a single record in the primary table. When executed, the function scans exchanged parameters for the record to be processed. If PK values are found in parameters, it will fetch the record to show a form in inquire mode. Users push the button to change modes(edit, copy, delete). If PK values are not found, it will show the form in insert-mode. You can control mode by exchanging a specific parameter(INSTANCE_MODE); with value of "ADD" for insert mode, "EDIT" for edit mode, "INQ" for inquire-only mode.

Function sample of Single CRUD


Editting the definition of the function above


Elements to be defined

< Basic Attributes>
Function Type - Fixed value
Function ID - Fixed and unique value in the system
Function Name
- Descriptive expression of the function. Note that the value is not the form title.
Primary Table - The main table which records to be processed. Possible to define alternative key to be handled.
Fixed Where - Fixed where criteria integrated into SELECT statement. It has to be for fields on the primary table. You can use User/Session attributes as variants(*1).
Data Name - The value will be incorporated in the form title according to the mode.
After Insert - The action to follow inserting record. Return means to exit, Calling means to call the specified function.
Continue Adding - If checked, it will repeat showing form to insert records after inserting.
Panel Size - Select one of options.
Update Only - If checked, it will show form in edit mode directly. Then the function name is set as the form title.
Initial Message - If specified the value is shown as the initial message in the form.

*1.Specify like USER_ATTRIBUTE:type for User Attribute(*2). Specify like SESSION_ATTRIBUTE:id for Session Attbirute(*3). If comparing string values, use single quotation as follows.
DTTHRU >= 'SESSION_ATTRIBUTE:DateFrom' AND DTTHRU <= 'SESSION_ATTRIBUTE:DateThru'
*2.The type can be either of ID, EmployeeNo, Name. For example if you want to get user ID, define as USER_ATTRIBUTE:ID.
*3.Session attributes can be registered using scripts (typically using Login Script). If specified attribute with id is not found, Driver will show an error message. For example if you want to get value of session attribute registered with id of "Today", define as SESSION_ATTRIBUTE:Today.

< Fields>
Properties to handle fields on the primary table or its join tables. Right-click on the list to add/delete fields. Drag the row of field to change order. Select the row to edit attributes as follow.

Table - Table ID and name which owns the field (Non editable)
Type - Table type of the table (Non editable)
Field - Field ID and name (Non editable)
Type - Data type, length and ext-type of the field (Non editable)
Layout Option - If Vertical selected, it will be layouted on the next row. If Horizontal selected, it will be layouted right side of the previous field. Note that each field extends in its height and width with its caption. This means that some of field areas may cover each other which result in malfunctions. Typical example is shown on the sample function above. The portrait field is layouted with 100 pics margin from the previous field. If with the shorter margin, some fields do not work normally in edit mode as they cover each other areas.
Width - Width of the field in pixcels. If *Auto specified, Driver will adjust size according to the caption or data size.
Rows - Height of the field in rows. If *Auto specified, image field is set as 11 rows and VARCHAR field is set as 2 rows and else as 1 row.
Margin - Margin to the previous field.
Caption - Heading of the field. Select Field Name or None orValue. By specifying SESSION_ATTRIBUTE:id as Value, you can control column heading dinamically (Note that you can not check design of the panel on Editor then). By checking Width Auto-Adjusted, caption width will be adjusted automatically.
Prompt - Setting of the field in edit mode. None represents direct input. List Box is to edit with list box. Call ID is to edit by calling function.
Comment - If specified, the value appears on the right side of the field.

< Tabbed Fields>
With more than 20 fields on the form, you had better use tab controls to divide them in groups. Define name, order and fields contained for each tab control. Users can use Tab-key or Ctrl+T to focus on the tab controls.

< Function Keys>
Definitions of function keys at the bottom of the panel. By exchanging a specific parameter(DISABLED_BUTTON_LIST), you can disable buttons with key no(use comma to separate values). Right-click on the list to add/delete definitions. Max of definitions is 7. Select the row to edit attributes of the definition as follow.

Position - Position of the button. 0 represents left end and 6 right end.
Function Key No - Function key number(F1-F12) allocated to the button.
Caption - Caption of the button.
Action - Action allocated to the button. Values selectable are "Exit", "Go to Edit-Mode and update", "Go to Copy-Mode", "Delete", "Output into EXCEL" and "Calling".
Function ID - Specify id of the function called if Action is set as "Calling". You can specify additional parameters of fixed value like INSTANCE_MODE:INQ. Use ; to separate parameters like PARM1:VALUE1;PARM2:VALUE2.

< Where-Used>
The list of functions using this function. Right-click on the row to jump to the definition.


To Function Type List