"There are too many dimensions " Error

MarharytaMykytenkoMarharytaMykytenko Member Posts: 53
edited 2020-01-16 in NAV Three Tier
I have a List Page which displays data of one integer field from a table.

I have to produce some operations with this field (sort in decreasing). So my field is like 10 dimension array (10 integer numbers are get).
Here error is occurs ("j" gets value from 1 to the (length of array-1))
0isw4sygtp1n.png

Could anybody tell me what I have to change or just why I have this error

Answers

  • PhoguePhogue Member Posts: 76
    What does the error specify? Hold your mouse over the j with the red line to reveal more information.
  • MarharytaMykytenkoMarharytaMykytenko Member Posts: 53
    Phogue wrote: »
    What does the error specify? Hold your mouse over the j with the red line to reveal more information.
    h2qtj3wh1gik.png

  • PhoguePhogue Member Posts: 76
    edited 2020-01-16
    Phogue wrote: »
    What does the error specify? Hold your mouse over the j with the red line to reveal more information.
    h2qtj3wh1gik.png


    Check the "dimensions" value of the properties of your variable J.

    If it's undefined, set it to 1, as so:

    3kqnlhq35ui7.png
  • MarharytaMykytenkoMarharytaMykytenko Member Posts: 53
    Phogue wrote: »
    Phogue wrote: »
    What does the error specify? Hold your mouse over the j with the red line to reveal more information.
    h2qtj3wh1gik.png


    Check the "dimensions" value of the properties of your variable J.

    If it's undefined, set it to 1, as so:

    3kqnlhq35ui7.png

    OK, thanks but now "j" is array and this error is occurs
    mv0fnhm42qu2.png
  • PhoguePhogue Member Posts: 76
    Phogue wrote: »
    Phogue wrote: »
    What does the error specify? Hold your mouse over the j with the red line to reveal more information.
    h2qtj3wh1gik.png


    Check the "dimensions" value of the properties of your variable J.

    If it's undefined, set it to 1, as so:

    3kqnlhq35ui7.png

    OK, thanks but now "j" is array and this error is occurs
    mv0fnhm42qu2.png

    I'm sorry @MarharytaMykytenko , I meant the "Input" variable, not the "J" variable, my mistake.
  • MarharytaMykytenkoMarharytaMykytenko Member Posts: 53
    Phogue wrote: »
    Phogue wrote: »
    Phogue wrote: »
    What does the error specify? Hold your mouse over the j with the red line to reveal more information.
    h2qtj3wh1gik.png


    Check the "dimensions" value of the properties of your variable J.

    If it's undefined, set it to 1, as so:

    3kqnlhq35ui7.png

    OK, thanks but now "j" is array and this error is occurs
    mv0fnhm42qu2.png

    I'm sorry @MarharytaMykytenko , I meant the "Input" variable, not the "J" variable, my mistake.

    heeeh,
    No, nothing changed
  • vaprogvaprog Member Posts: 1,116
    Hi,

    1 is not a sensible value for dimension. In this property you specify, how many elements your array will have.
    Dimension is actually quite misleading here (and also in your usage if the term in your original question).
    An array, as you used it in your example code has one dimension (It' is a line or string of data, having 1 coordinate). You can give it additional dimensions by adding more values to the Dimension property, separated by semicolons. You then specify the same number of subscripts when using the values of your array
    e.g
    A has property Dimension=10;10
    A[1,1] is your first element (note: it's 1-based)

    Array A now has two dimensions. It is a field (or plane) of values needing 2 coordinates to identify a value. The size of each dimension is 10.

    An ordinary Array has on dimension. So in your case
    variable Input should have property Dimension=10

    If you still have problems, try to remove any code that has no bearing in the error, reducing the code to the bare minimum where the error still occurs. If that process did not help you by itself to figure out the problem, post that code, including the declarations, for the community to investigate further.
  • MarharytaMykytenkoMarharytaMykytenko Member Posts: 53
    vaprog wrote: »
    Hi,

    1 is not a sensible value for dimension. In this property you specify, how many elements your array will have.
    Dimension is actually quite misleading here (and also in your usage if the term in your original question).
    An array, as you used it in your example code has one dimension (It' is a line or string of data, having 1 coordinate). You can give it additional dimensions by adding more values to the Dimension property, separated by semicolons. You then specify the same number of subscripts when using the values of your array
    e.g
    A has property Dimension=10;10
    A[1,1] is your first element (note: it's 1-based)

    Array A now has two dimensions. It is a field (or plane) of values needing 2 coordinates to identify a value. The size of each dimension is 10.

    An ordinary Array has on dimension. So in your case
    variable Input should have property Dimension=10

    If you still have problems, try to remove any code that has no bearing in the error, reducing the code to the bare minimum where the error still occurs. If that process did not help you by itself to figure out the problem, post that code, including the declarations, for the community to investigate further.

    Thanks everyone for answers and ideas.
    I have already solved my problem. Your tips were so useful.
  • MarharytaMykytenkoMarharytaMykytenko Member Posts: 53
    edited 2020-01-17
    May be somebody knows how can I get all values of field in table for writing in the variable of array? (type of field - Integer)
Sign In or Register to comment.