Consultor Eletrônico



Kbase 16963: How to get a SmartBrowse to initialize cells on an Add
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
How to get a SmartBrowse to initialize cells on an Add

To get a SmartBrowse to automatically initialize a field with a value
when a new row is added to the SmartBrowse via a SmartPanel you need
to do the following:

1) Add a local-create-record procedure to the SmartBrowse.

2) After the standard behavior, add code similar to the following:

ASSIGN Table.FieldName = "Initial Value".

DISPLAY Table.FieldName WITH BROWSE {&BROWSE-NAME}.

3) Save and compile the SmartBrowse.

4) In the SmartWindow (or other SmartObject), set the SmartBrowsers
Instance Attributes so that the "Create new record immediately
on 'Add'?" option is "Yes".

5) Save and compile the SmartWindow (or other SmartObject).

6) Run the code.

Voila! (you are done)

Progress Software Technical Support Note # 16963