Consultor Eletrônico



Kbase 17834: Apptivity: assigning default values to a data source
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Apptivity: assigning default values to a data source

Setting default values for columns in a data source so the values
display on screen when new records are added:

This kbase shows different examples of how columns can be
automatically filled with a value when the Data Source addNew()
method is called.

1. This is an example of providing an initial value set to
a hard coded value

new abInitValue(new Integer(234), "orders", "OrderID");

2. This is an example of providing the initial value from another
datasource column

new abInitValue("cust", "CustomerID", "orders", "CustomerID");

3. This is an example of providing an initial value set to a data
object/ calculated value. Here the calculated value is called
abkeyvalue.

abDataSink sink = theApp().getGlobal("abkeyvalue");
new abInitValue(sink, "orders", "OrderID");

The statements should be added to the init() ethod of the project's
.java file, i.e in the Tutorial project you would add the code to the
init() method of the Tutorial.java file.


PES 04/08/98

Progress Software Technical Support Note # 17834