ICalendarDimension.AttributeNameFormat

Syntax

AttributeNameFormat(AttrNumber: Integer; BlockIndex: Integer): Integer;

Parameters

AttrNumber — attribute number. Number of the "Dictionary Element Name" attribute is passed as the value of this parameter.

BlockIndex — index of the block for which you need to change format of element name displaying.

Block index Block name
0 Root.
1 Year.
2 Half-year.
3 Quarters.
4 Months.
5 Days.
6 Nine months.

Description

The AttributeNameFormat property determines format for displaying element names in selected dictionary block.

This property may take the following values:

Format index Brief description
0 Root. (Name of calendar dictionary).
1 Year. (2000).
2 Half-years. (I half-year of 2000).
3 Quarters. (I quarter of 2000).
4 Months. (Jan 2000).
5 Days. (01 Jan 2000).
6 Nine months. (9 months of 2000).
7 Brief date format. (01.01.2000).
8 Week starting from January 01

Example

Executing the example assumes that the repository contains a calendar dictionary with the CALENDAR_DIM identifier.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

CalDim: ICalendarDimension;

i, j: Integer;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("CALENDAR_DIM").Edit;

CalDim := MObj As ICalendarDimension;

For i := 0 To CalDim.AttributeCount - 1 Do

If CalDim.AttributeIndex(i) = 0 Then

j := i;

End If;

End For;

CalDim.AttributeNameFormat(j, 5) := 7;

MObj.Save;

End Sub Main;

After executing the example position of the Calendar Element Name attribute is defined to change format of displaying. Brief date format is set for the Days block.

See also:

ICalendarDimension