DefaultBehaviour: IDefaultBehaviour;
DefaultBehaviour: Prognoz.Platform.Interop.KeFore.DefaultBehaviour;
The DefaultBehaviour property returns the object to work with default settings.
To execute the example add links to the system assemblies:
For Fore: Fore, Metabase
For Fore.NET: KeFore, Metabase.
Sub UserProc;
Var
Mb: IMetabase;
SP: ISharedParams;
DB: IDefaultBehaviour;
Begin
// Get the current repository
Mb := MetabaseClass.Active;
// Select table display type for element card in default settings
SP := Mb.SpecialObject(MetabaseSpecialObject.SharedParams).Edit As ISharedParams;
//Determine default settings
DB := SP.DefaultBehaviour;
// Select table display type for element card in default settings
DB.RDSElementCard := RdsElementCardStyle.PropertyList;
// Select table display type for element card in default settings
DB.TreatEmptySelectionAsFull := True;
(SP As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.KeFore;
…
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
SP: ISharedParams;
DB: IDefaultBehaviour;
Begin
// Get the current repository
Mb := Params.Metabase;
// Select table display type for element card in default settings
SP := Mb.SpecialObject[Prognoz.Platform.Interop.Metabase.MetabaseSpecialObject.msoSharedParams].Edit() As ISharedParams;
//Determine default settings
DB := SP.DefaultBehaviour;
// Select table display type for element card in default settings
DB.RDSElementCard := RdsElementCardStyle.recsPropertyList;
// Select table display type for element card in default settings
DB.TreatEmptySelectionAsFull:= true;
(SP As IMetabaseObject).Save();
End Sub;
After executing the example, in default settings table view type for MDM dictionary element card will be set and the Treat Empty Selection as Full on the Behavior tab will be selected.
See also: