Array with 2 values

suvidhasuvidha Member Posts: 117
How do i use array with 2 values in NAV?

Answers

  • Sandeep_PrajapatiSandeep_Prajapati Member Posts: 151
    suvidha wrote:
    How do i use array with 2 values in NAV?

    I didn't get you.. :shock: need some example..
    Sandeep Prajapati
    Technical Consultant, MS Dynamics NAV
  • suvidhasuvidha Member Posts: 117
    i mean Array[j].
    i wanna store 2 values in an array.
  • MalajloMalajlo Member Posts: 294
    Dimensions property of variable should be in X;Y (array 3x2 is then 3;2)
    Use as

    Array[1][1] := 'VALUE'
  • BeliasBelias Member Posts: 2,998
    Search online help in nav for "Dimensions", you will find that you can create a multidimensional array writing for example
    4;8
    in dimension property of the variable...
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • suvidhasuvidha Member Posts: 117
    Thank you..
    but how do i assign values into them?
    can u plz give example??
  • BeliasBelias Member Posts: 2,998
    array[1][1] := a;
    array[1][2] := b;
    array[2][1] := c;
    
    etc....

    maybe you'll need some
    For i
    For j
    .....

    cycle
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Sandeep_PrajapatiSandeep_Prajapati Member Posts: 151
    An n-dimensonal array can be imlplemented using one-dimension array.
    For a 2-dimension array, try to implement following

    Array1[j] is equivalent to Array2[i*j];
    Sandeep Prajapati
    Technical Consultant, MS Dynamics NAV
  • anuragatishanuragatish Member Posts: 48
    An n-dimensonal array can be imlplemented using one-dimension array.
    For a 2-dimension array, try to implement following

    Array1[j] is equivalent to Array2[i*j];

    ka malik....kaise hain
    Anurag atish
    Navision Technical Consultant
    Bangalore
    anurag.atish@yahoo.com
  • BeliasBelias Member Posts: 2,998
    An n-dimensonal array can be imlplemented using one-dimension array.
    For a 2-dimension array, try to implement following

    Array1[j] is equivalent to Array2[i*j];

    :shock: :shock:

    it's not true!
    array[i*j] means that element [3][2] will overwrite element [2][3]...
    btw...you CAN create multidimensional arrays in nav (arrays or arraies? :oops: )
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • suvidhasuvidha Member Posts: 117
    is there any standard object using multidimensional array??
  • garakgarak Member Posts: 3,263
    Do you doesn't understand it how to use an array with more than one dimension :?:

    Take a look in Form 223 Resource Statistics

    Regards
    Do you make it right, it works too!
  • suvidhasuvidha Member Posts: 117
    ThankQ.......... :)
  • krikikriki Member, Moderator Posts: 9,110
    As far as I remember, Navision can use up to 10 dimensions with a maximum of 1.000.000 (or 1.000.000.000) elements.
    The variable-definition is as follows : In the Dimensions-property you have to define the dimensions as follows : N or N;M or N;M;O ....

    To reference an element, you do as follows:
    arrayElement[n] or arrayElement[n,m] or arrayElement[n,m,o].
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Sandeep_PrajapatiSandeep_Prajapati Member Posts: 151
    Belias wrote:
    An n-dimensonal array can be imlplemented using one-dimension array.
    For a 2-dimension array, try to implement following

    Array1[j] is equivalent to Array2[i*j];

    :shock: :shock:

    it's not true!
    array[i*j] means that element [3][2] will overwrite element [2][3]...
    btw...you CAN create multidimensional arrays in nav (arrays or arraies? :oops: )



    Belias is correct , ... Array1[j] is not equivalent to Array2[i*j];[/quote].. It was a mistake.

    Suppose we have defined an Array1[m,n].... then referencing [i,j]th element in the array by implementing Array2[(i-1)*n + j)].
    what I mean is Array1[i,j] is equivalent to Array2[(i-1)*n + j]

    and true, we CAN create multidimensional arrays 8) in nav (the default one already in NAV)... O:)
    Sandeep Prajapati
    Technical Consultant, MS Dynamics NAV
Sign In or Register to comment.