IRdsAttribute.VisibleForEdit

Fore Syntax

VisibleForEdit: TriState;

Fore.NET Syntax

VisibleForEdit: Prognoz.Platform.Interop.ForeSystem.TriState;

Description

The VisibleForEdit property determines whether an attribute value is available to edit in a card of a dictionary element.

Comments

Available values of the property correspond to elements of the enumeration TriState:

Value of the VisibleForEdit property affects values of the IRdsAttribute.Nullable and IRdsAttribute.Hidden properties in the following ways:

So, value of the IRdsAttribute.Nullable property must be changed the last.

Fore Example

Executing the example requires an MDM repository with the RDS identifier that contains a dictionary with the DICT_RDS identifier. Add links to the Metabase, Rds, Dal system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    RdsKey: Integer;
    RdsDict: IRdsDictionary;
    RdsAttr: IRdsAttribute;
Begin
    mb := MetabaseClass.Active;
    RdsKey := mb.GetObjectKeyById("RDS");
    RdsDict := mb.ItemByIdNamespace("DICT_RDS", RdsKey).Edit As IRdsDictionary;
    RdsAttr := RdsDict.Attributes.Add;
    RdsAttr.Id := "USER_ATTR";
    RdsAttr.Name := Country;
   RdsAttr.DataType := DbDataType.String;
    RdsAttr.VisibleForEdit := TriState.OnOption;
   (RdsDict As IMetabaseObject).Save;
End Sub UserProc;

After executing the example a new attribute is added in a dictionary; this attribute is always available to edit in a card of dictionary element.

Fore.NET Example

Executing the example requires an MDM repository with the RDS identifier that contains a dictionary with the DICT_RDS identifier.

Imports Prognoz.Platform.Interop.Rds;
Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.ForeSystem;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    RdsKey: uinteger;
    RdsDict: IRdsDictionary;
    RdsAttr: IRdsAttribute;
Begin
    mb := Params.Metabase;
    RdsKey := mb.GetObjectKeyById("RDS");
    RdsDict := mb.ItemByIdNamespace["DICT_RDS", RdsKey].Edit() As IRdsDictionary;
    RdsAttr := RdsDict.Attributes.Add();
    RdsAttr.Id := "USER_ATTR";
    RdsAttr.Name := Country;
    RdsAttr.DataType := DbDataType.ddtString;
    RdsAttr.VisibleForEdit := TriState.tsOnOption;
    (RdsDict As IMetabaseObject).Save();
End Sub;

After executing the example a new attribute is added in a dictionary; this attribute is always available to edit in a card of dictionary element.

See also:

IRdsAttribute