InformationRegisterRecordSet.<Information register name>
Collection elements:
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:
DataExchange
Filter
ThisObject
Write
Methods:
CheckFilling
Clear
Count
Delete
Fill
Get
GetForm
IndexOf
Insert
Load
LoadColumn
Metadata
Modified
Move
Read
Selected
SetActive
Total
Unload
UnloadColumn
UnloadColumns
Write
Events:
FillCheckProcessing
Filling
OnWrite
Description:
The maximum number of records in a set is 999999999.
Availability:
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:
InformationRegisterSelection, property Active
InformationRegisterManager, method CreateRecordSet
InformationRegisterRecordSet, property ThisObject