ValueList.Insert

Syntax:

Insert(<Index>, <Value>, <Representation>, <CheckMark>, <Picture>)

Parameters:

<Index> (required)

Type: Number.
Index of the position at which the item is to be inserted.

<Value> (optional)

Type: Arbitrary.
Value to be inserted.

<Representation> (optional)

Type: String; FormattedString.
A string expression containing a representation of the value being added.
Default value: Empty string.

<CheckMark> (optional)

Type: Boolean.
Defines whether to create a new value with check mark set or not.
Default value: False.

<Picture> (optional)

Type: Picture.
Visual value representation.
Default value: Empty picture.

Returned value:

Type: ValueListItem.
New list of values item.

Description:

Inserts a new item at the position in the list of values corresponding to the specified index.

Availability:

Thin client, web-client, server, thick client, external connection, Mobile application (client), Mobile application (server).

Example:

PriceTypesList.Add("All extra charges",, True);
SelectionOfPriceTypes = Catalogs.PriceTypes.Select();
While 
SelectionOfPriceTypes.Next() Do
    PriceTypesList.Insert(0, SelectionOfPriceTypes.Ref, 
                            SelectionOfPriceTypes.Markup, False);
EndDo
;


    

1C:Enterprise Developer's Community