Thursday 21 February 2013

Ashish, congratulations! You have one of the top 1% most viewed LinkedIn profiles for 2012.

I just received an email from LinkedIn:

"Ashish, congratulations! You have one of the top 1% most viewed LinkedIn profiles for 2012"


It is good to know that my LinkedIn profile is in top 1% most viewed profiles for 2012.

Click here to view my LinkedIn profile.


My LinkedIn profile is in top 1% most viewed profiles for 2012
My LinkedIn profile is in top 1% most viewed profiles for 2012

Please feel free to leave your comments.

Monday 4 February 2013

Microsoft Dynamics AX 2012 R2 - conLen Function


Retrieves the number of elements in a container.


Function

  • int conLen(container container)

Parameters

  • Parameter: container
  • Description: The container in which to count the number of elements.
The object parameter can be of most data types, but useful output is obtained when it is of the str or int type. Inappropriate content generates a run-time error.

Return Value

  • The number of elements in the container.

Example

  • X++
static void conLenExample(Args _arg)
{
    container c;
    int i;
    ;

    c = conins(["item1", "item2"], 1);
    for (i = 1 ; i <= conLen(c) ; i++)
    {
        print conPeek(c, i);
     }
    pause;
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - conLen Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - conIns Function


Inserts one or more elements into a container.


Function

  • container conIns (container container, int start, anytype element, ... )

Parameters

  • Parameter: container
  • Description: The container into which to insert elements.
 
  • Parameter: start
  • Description: The position at which to insert elements.
 
  • Parameter: element
  • Description: One or more elements to insert, separated by commas.

The first element of the container is specified by the number 1. To insert after the n element, the start parameter should be n+1.

You can also use the += operator to add values of any type into a container. For example, to create a container that contains the squared values of the first 10 loop iterations:

  • X++
int i;
container c;

for (i = 1; i < = 10; i++)
{
    c += i*i;
}

Return Value

  • The new container with the inserted elements.

Example

  • X++
static void conInsExample(Args _arg)
{
    container c;
    int i;
    ;

    c = conIns(c,1,"item1");
    c = conIns(c,2,"item2");
    for (i = 1 ; i <= conLen(c) ; i++)
    {
    // Prints the content of a container.
        print conPeek(c, i);
      
    }
    pause;

}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - conIns Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - conFind Function


Locates the first occurrence of an element or a sequence of elements in a container.

Function

  • int conFind (container container, anytype element,... )

Parameters

  • Parameter: container
  • Description: The container to search.
 
  • Parameter: element
  • Description: One or more elements to search for, separated by commas.
If several elements are specified in the sequence, they must be separated by commas and specified in the correct sequence. The elements can be of any data type.

Return Value

  • Returns 0 if the item was not found; otherwise, the sequence number of the item.

Example

  • X++
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;
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - conFind Function' was informative. Please feel free to leave your comments.