Default values on new records are defined as follows:
In the Default Value property for the field, enter the desired value. Values entered in the default value field will only be displayed on screens in New or QBE mode. Values can be:
Hard coded. For example, the default value for an option list would be one of the values defined in the list of values for that field.
Reference a global value. For example, the default value for many financial enterprise fields is the global value '$$ORG_UNIT_ID$$'.
Reference another field on a block. For example, when entering a new purchase order line, you might want the due date field to default to the already existing purchase order date in the header. You could enter $$PO_DETAIL.PO_DATE$$ as the default value for the field.
In the Query for New property on the block, you can enter a select statement to define the values for fields within that block when the block is in New mode. The select statement can refer to an existing database table or view or it can refer to the dummy table dual. When writing the select statement, you must alias the field into which the value will be inserted.
For example, to insert the org_unit_id
from the user's log in record into the ORG_UNIT_ID field on a page, you
could enter:
select org_unit_id ORG_UNIT_ID from user_me_vw
To insert the system date into
the PO_DATE field, you might enter:
select to_char(sysdate, 'yyyy-MM-dd') po_date
from dual
Xephr expects dates returned from the datasource to be in the format
defined in the datasource. The format mask is applied
by Xephr to the date returned from the datasource.
To insert the global value $$EMAIL$$
into the EMAIL field for a new support log, you would enter:
select $$EMAIL$$ EMAIL from dual
Xephr is a registered trademark of NDS Systems, LC.
Copyright