conPoke Function [AX 2012]

Updated: January 18, 2010

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Modifies a container by replacing one or more of the existing elements.


container conPoke(
    container container,
    int start,
    anytype element,
    ...)

Parameter

Description

container

The container to modify.

start

The position of the first element to replace.

element

One or more elements to replace, separated by commas.

The new container with the new elements.

The first element of the container is specified by the number 1.

static void conPokeExample(Args _arg)
{
    container c1 = ["item1", "item2", "item3"];
    container c2;
    int i;
 
    void conPrint(container c)
    {
        for (i = 1 ; i <= conLen(c) ; i++)
        {
            print conPeek(c, i);
        }
    }
    ;
    conPrint(c1);
    c2 = conPoke(c1, 2, "PokedItem");
    print "";
    conPrint(c2);
    pause;
}

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

ADD
Show: