find in container OR how to use confind() in dynamics ax

Description:-

In this Article we will see about container in ax. There are more functionality in container to do in ax it’s like array to store data in container and read it from container. A container can be stored in the database as a dataBasecoloumn created through AOT especially used to store images/files as a blob. For example assignment of a container to another container variable and container functions such as conIns(), conDel(), conPoke(), += etc. are actually creating a new copy of the container. Here is the demo Example of container in Ax.

confind:- Use confind to locate a sequence of items in a container.

EX:-  int conFind (container container, anytype element,... )

static void conFindExample(Args _args)
{
    container c = ["item1", "item2", "item3"];
    int i;
    int j;
    ; 
    i = conFind(c, "item2");
    j = conFind(c, "item4");
    print "Position of 'item2' in container is " + int2Str(i);
    print "Position of 'item4' in container is " + int2Str(j);
    pause;
}

Related Posts

Previous
Next Post »

Thanks for comments.....