Options

temporary records with dimensions

Cem_KaraerCem_Karaer Member Posts: 281
Hello all,

I have a table with one integer field. Then I do following with TEMPORARY record variable of the table with 2 dimensions:
Test[1]."Int Field" := 3;
Test[1].INSERT;
Test[1]."Int Field" := 2;
Test[1].INSERT;
Test[2]."Int Field" := 1;
Test[2].INSERT;

Test[1].FINDFIRST;
MESSAGE(FORMAT(Test[1]."Int Field"));

The result is 1. But I would expect 2. Why does it work in this way? Is there any way to make a distinction between the records belonging to the dimension 1 and the ones to dimension 2, preventing the shuffle?
Cem Karaer @ Pargesoft
Dynamics NAV Developer since 2005

Comments

  • krikikriki Member, Moderator Posts: 9,120
    Dimensions on a temptable refer to THE SAME temptable. If you need a separate temptable, you need another variable.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.