IDimElements.ReadAccess

Syntax

ReadAccess(Element: Integer): Boolean;

Parameters

Element — element index.

Description

The ReadAccess property returns True, if user has read access to the Element element.

Example

Executing the example requires a repository object with the D_TO identifier.

Add links to the Metabase and Dimensions system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Dimen: IDimInstance;
    Elem: IDimElements;
    s: String;
Begin
    MB:=MetabaseClass.Active;
    Dimen:=MB.ItemById(
"D_TO").Open(NullAs IDimInstance;
    Elem:=Dimen.Elements;
    
If Elem.ReadAccess(20Then
        s:=
"Read";
        
Else s:="Don’t Read";
    
End If;
End Sub UserProc;

After executing the example the "s" variable shows Read if the current user has read access to the 20th dictionary element.

See also:

IDimElements | ISecurityLabels