Consultor Eletrônico



Kbase 19942: SmartUpdatePanels, Copy and Unique Fields
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/12/2000
SUMMARY:

It is possible to encounter the error message:

** <file-name> already exists with <field/value...>.
(132)

when you use the COPY function to create a record with Progress SmartUpdatePanel. This solution provides a workaround.

EXPLANATION:

There are two ways for creating records using a SmartUpdatePanel:

- The ADD function clears all available fields,
assigns default values (from the dictionary), then
goes into update mode.

- The COPY function duplicates the current record and
allows you to modify the current information to be able to save it as a new record.

If one of the available fields requires the information to be unique (such as CUST-NUM or ORDER-NUM), you cannot save this copied record and the above error is generated.

SOLUTION:

Set these particular fields to be non-updateable in the property sheet of the SmartDataObject (SDO).
Now, when the COPY function is executed, it will follow the same rules set for the ADD function of the SmartUpdatePanel.