Entry_Item

Purpose

To define an entry item in a data entry object, such as a dbForm

Syntax

Entry_Item {table.column | expression}

What It Does

An Entry_Item command defines the association between a data entry object and the destination of the data. Entry_Item is used to place data into a column of a database table's record buffer. An Entry_Item command may also be attached to an expression, so that it displays the value of the expression on the screen. Entry_Item expressions are not supported in cDbCJGridColumn objects. To create a calculated column in a DB column object you should omit the Entry_Item command and use the OnSetCalculatedValue event.

This association provides both for display of the column contents and data entry of the column value. If the argument is a {table.column}, then the item content is transferred between the screen and the data-dictionary buffer.

Entry objects support a wide set of column properties that allow you to control every aspect of the data entry interface. Each of these properties can be defined in DataDictionary classes and objects (DDOs). Data Dictionary classes are designed in the Studio's Data Dictionary Modeler. For more information, please also see the Data Dictionary Guide and the DataDictionary class in the Class Reference.

 

Example

Below is an example of an entry item for the Customer_Number column of a customer table:

Object Customer_Number is a dbForm

    Entry_Item Customer.Customer_number

    Set Label to "Customer Number:"

    Set Size  to 13 42

    Set Location to 5 72

End_Object

Below is an example of an expression entry item.

Object Customer_Available_Credit is a dbForm

    Entry_Item (Customer.Credit_limit – Customer.Balance)

    Set Label to "Available Credit:"

    Set Size to 13 48

    Set Location to 9 72

End_Object

Below is an example of an expression entry item that calls a function that is defined in its Server DDO.

Object oInvt_DD is a Invt_DataDctionary

    ...

 

    Function CalcExtended Returns Number

        Number nExtent

        Move (Orderdtl.Qty_Ordered*Orderdtl.Price) to nExtent

        Function_Return nExtent

    End_Function

 

End_Object  // oInvt_DD

 

Object oInvtDbGrid is a dbGrid

    ...

 

    Begin_Row

        Entry_Item Invt.Item_id

        Entry_Item Invt.Description

        Entry_Item Invt.Unit_price

        Entry_Item Orderdtl.Price

        Entry_Item Orderdtl.Qty_ordered

        Entry_Item (CalcExtended(Server(Self)))

    End_Row

 

End_Object  // oInvtDbGrid