**
I see... So it's a way to protect a future upgrade...
Fair enough, thanks for the details and explanation :)

On 09 Apr, 2013,at 02:50 AM, Chuck Mousseau <chuck_mouss...@bmc.com> wrote:

Hey Folks,

The inability to create unique indexes on a form overlay is not a bug; it's intentional.

The reason is that it affects operations at the origin layer as well as at the overlay layer.

Records for a form and its overlay are stored in the same database tables. That means indexes created for either affect data operations for both.

If a unique index were created in the overlay layer, it would still be enforced on records created or modified through the origin layer, so the behavior of the origin layer would be changed.

If the index is on a custom field, then it becomes impossible to create records at the origin layer. If the index is on an origin field or on an overlaid field, it can still prevent operations that were previously legal at the origin layer.

Among other things this could cause upgrades to fail by preventing them from updating data.

Unique indexes can be created on custom forms, because changes to custom forms do not affect the origin layer -- those forms are not visible there and no data operations can be performed on them at that layer.

One workaround that has been suggested is to go to Base Development mode in Developer Studio and then to add the unique index to the origin form. Doing that can prevent upgrades from succeeding. It also doesn't guarantee that the change will be persisted across an upgrade if the upgrade should succeed, because the change is not captured in an overlay.

If we want to ensure that a field's contents on an overlaid form are unique in the overlay layer, the best way to accomplish that is to create a custom filter that returns an error when duplicate data is written.

The filter will not affect operations performed at the origin layer, but it will protect data written at the overlay layer.

Hope this helps,
-Chuck



_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"
_ARSlist: "Where the Answers Are" and have been for 20 years_

Reply via email to