InformationRegisterManager.<Information register name>.Select

Syntax variant: For a periodic register

Syntax:

Select(<StartOfRange>, <EndOfRange>, <Filter>, <Order>)

Parameters:

<StartOfRange> (optional)

Type: Date; PointInTime; Boundary.
Beginning of the interval for which information register records will be displayed. If not specified, the records are selected from the earliest of them (inclusive). May be set by values of Date, PointInTime or Boundary type .

<EndOfRange> (optional)

Type: Date; PointInTime; Boundary.
End of the interval for which information register records will be displayed. If not specified, the records will be displayed up to the latest (inclusive). May be set by values of Date, PointInTime or Boundary type .

<Filter> (optional)

Type: Structure.
Specifies a filter field and value of the opened selection. The structure key refers to a field name, while the structure value refers to the key filter value. You can use dimensions or attributes as filter fields, provided their indexing flags have been set to "Index" in the Designer or "Master" flag is set. The type of comparison can be Equal only.
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.
Important: A structure can contain only one element.

<Order> (optional)

Type: String.
Can contain the words "Asc" or "Desc", then the standard order will be used with the direction specified.
Can contain the field name (of the attribute or dimension that have the indexing set) and the words "Asc" or "Desc", then the ordering will be made by the specified field in the specified order.
Default value: "Asc".

Syntax variant: For a non-periodic register

Syntax:

Select(<Filter>, <Order>)

Parameters:

<Filter> (optional)

Type: Structure.
Specifies a filter field and value of the opened selection. The structure key refers to a field name, while the structure value refers to the key filter value. You can use dimensions or attributes as filter fields, provided their indexing flags have been set to "Index" in the Designer or "Master" flag is set.
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.
Important: A structure can contain only one element.

<Order> (optional)

Type: String.
Can contain the words "Asc" or "Desc", then the standard order will be used with the direction specified.
Can contain the field name (of the attribute or dimension that has the indexing set) and the words "Asc" or "Desc" (space-separated), then the ordering will be made by the specified field in the specified order.
As value of parameter the string "No" can be set. It will mean, that the system will choose the optimal order of detour of such sample which generally will not correspond to the order of detour by default.
Default value: "Asc".

Returned value:

Type: InformationRegisterSelection.

Description:

Forms the information register records selection.

Availability:

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

Example:

Rates = InformationRegisters.ExchangeRates;
CurrencyFilter = New Structure("Currency");
CurrencyFilter.Currency = SelCurrency; 
ExchangeRatesSelection = Rates.Select(,,CurrencyFilter);
While 
ExchangeRatesSelection.Next() Do
    Message("Date " + ExchangeRatesSelection.Period + 
    " Currency "+TrimAll(ExchangeRatesSelection.Currency) +
    ", Rate "+  ExchangeRatesSelection.Rate );
EndDo
;


    

1C:Enterprise Developer's Community