InformationRegisterManager.<Information register name>.GetLast

Syntax:

GetLast(<EndOfPeriod>, <Filter>)

Parameters:

<EndOfPeriod> (optional)

Type: Date; PointInTime; Boundary.
Determines a point in time for which you need to get resource values. May be set by values of Date, PointInTime or Boundary type . If this parameter is not set, resource values of the last register record will be returned.

<Filter> (optional)

Type: Structure.
Structure containing the register dimensions filter. Structure key name must be the same as the register dimension name specified in the designer, and value of an element of structure - sets value selected on given dimension.
The structure may additionally have the items that correspond to separators of register with the IndependentlyAndSimultaneously level of separation, which include the register. If such a structure item is specified for use in a session separator, then value for this item must match the separator value, otherwise it will throw an exception.
If the parameter is not specified filter is not used.

Returned value:

Type: Structure.
Returns the structure containing resource values.

Description:

Obtains the resource values of the latest register record that corresponds to the specified period and register dimensions values.

Availability:

Server, thick client, external connection, Mobile application (server).

Note:

Apply for periodic information registers only.

Example:

Dollars = Catalogs.Currencies.FindByDescription("USD");
Filter = New Structure;
Filter.Insert("Currency", Dollars);
Rates   = InformationRegisters.ExchangeRates;
CurRate = Rates.GetLast(CurrentDate(), Filter);
Message("Current dollar rate: " + CurRate.Rate + " roub.");


    

1C:Enterprise Developer's Community