InformationRegisterRecordSet.<Information register name>

Collection elements:

InformationRegisterRecord
Iteration through collection using For each ... In ... Do operator is available to object. Collection items are retrieved during iteration.
Access to collection item is possible using [...] operator. Record index (starting from 0) is passed as an argument.

Properties:

AdditionalProperties
DataExchange
Filter
ThisObject
Write

Methods:

Add
CheckFilling
Clear
Count
Delete
Fill
Get
GetForm
IndexOf
Insert
Load
LoadColumn
Metadata
Modified
Move
Read
Selected
SetActive
Total
Unload
UnloadColumn
UnloadColumns
Write

Events:

BeforeWrite
FillCheckProcessing
Filling
OnWrite

Description:

It is used for operations with register record sets in memory. This is a collection of information register records. It enables the user to read records from the database for a particular filter criterion, and add, delete, or modify records in the set. User can also write to the database for a specified condition. On saving, all existing records in the database for the given condition can be replaced with records contained in the set.
The maximum number of records in a set is 999999999.

Availability:

Server, thick client, external connection, Mobile application (server).
The given object may be serialized to/from XML. The given object may be serialized to/from XDTO. The XDTO type correspoding to this object is defined in {http://v8.1c.ru/8.1/data/enterprise/current-config} namespace. XDTO type name: InformationRegisterRecordSet..

Example:

ExchangeRates = InformationRegisters.ExchangeRates;
RatesSet = ExchangeRates.CreateRecordSet();
Dollar = Catalogs.Currencies.FindByDescription("USD");
RatesSet.Filter.Currency.Set(Dollar);
RatesSet.Filter.Period.Set(BegOfDay(CurrentDate()));
RatesSet.Read();
If 
RatesSet.Count() = 0 Then
    NewRate = RatesSet.Add();
    NewRate.Currency = Dollar;
    NewRate.Period = CurrentDate();
ElseIf RatesSet.Count() = 1 Then
    NewRate = RatesSet[0];
Else
    DoMessageBox("Rate is set once a day.", 60);
    Return
;
EndIf
;
NewRate.Rate = 31.44;
NewRate.Repetition = 1;
RatesSet.Write();
Message("Rate " + TrimAll(NewRate.Currency) + " for today: "+ 
              NewRate.Rate + " roub.");

See also:

InformationRegisterRecord, property Active
InformationRegisterSelection, property Active
InformationRegisterManager, method CreateRecordSet
InformationRegisterRecordSet, property ThisObject

    

1C:Enterprise Developer's Community