InformationRegisterSelection.<Information register name>.Next

Syntax:

Next()

Returned value:

Type: Boolean.
True - next record is selected; False - end of the selection is reached.

Description:

Obtains the next record from the selection. To tab through register records you should call this method to move to the first record and then keep calling until False value is returned.

Availability:

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

Example:

// find maximum rivals price for the SelArticle goods
PricesMarketing = InformationRegisters.PricesMarketing;
ArticleFilter = New Structure("Nomenclature");
ArticleFilter.Nomenclature = Selection;
ArticleCosts = PricesMarketing.Select(,,ArticleFilter);
MaxPrice =0;
Rival = "Not found";
While 
ArticleCosts.Next() Do
    If ArticleCosts.Cost > MaxPrice Then
        MaxPrice = ArticleCosts.Cost;
        Rival = ArticleCosts.Rival.Name; 
    EndIf
;
EndDo
;
DoMessageBox("Maximum price """ 
    + TrimAll(Selection) + """ = "+ MaxPrice + " USD. It is used by "" " 
    + TrimAll(Rival) + """.");


    

1C:Enterprise Developer's Community