Consultor Eletrônico



Kbase 20658: ADM2: Why SmartDataBrowsers are not Re-sorted After Edit?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Unverified

GOAL:

Why SmartDataBrowsers are not Re-sorted After Edit?

FACT(s) (Environment):

Progress 9.x

FIX:

The SmartDataObject (SDO) gets the records order from the data base according to the query sort condition. The SDO 'Rows To Batch' property determines the number of rows to be added in the RowObject temp-table. These records are sorted by the RowNum field that is defined as primary index in the RowObject definitions. The fields in the RowObject temp-table are defined in two include files. The following is an example of the RowObject definition in a SmartDataBrowser:

/* Include file with RowObject temp-table definition */
&Scoped-define DATA-FIELD-DEFS "dcustmr.i"

DEFINE TEMP-TABLE RowObject
{{&DATA-FIELD-DEFS}}
{src/adm2/robjflds.i}.

In this example, the dcustmr.i file has the fields selected in the SDO master. The robjflds.i is a Progress source file that has the following fileds and index definitions:

FIELD RowNum AS INTEGER
FIELD RowIdent AS CHARACTER
FIELD RowMod AS CHARACTER INIT "":U
INDEX RowNum IS PRIMARY RowNum
INDEX RowMod RowMod
INDEX RowIdent RowIdent

Thus the RowObject temp-table has the RowNum field as primary index. Therefore, if the value of a sort field is changed, the RowObject update still sorts by RowNum field.

For information on how to re-sort the SmartDataBrowser, see How to re-sort a SmartDataBrowser after a row update