Calling object properties

In addition to point-base calls, 1C:Enterprise script supports calling object properties using the strings with [] operator (square brackets).

Syntax:

<Object>[<Property name>]

Parameters:

<Object>

Object, a property of which is called.

<Property name>

Type: String. Name of the property that should be called.

Description:

You can use this structure to call object properties just like using point-based methods.

Example:

Cat = Catalogs.Nomenclature.FindByCode(SoughtCode);

// Calling catalog name using string with property name
= Cat[“Name”];

// Calling catalog name using property name
= Cat.Name;

// Both property calls are identical

1C:Enterprise Developer's Community