Temporary table

DesmedtSDesmedtS Member Posts: 53
edited 2002-01-31 in Navision Attain
How can i let a subform show the records of a temporary table (defined in globals as record with property temporary = yes)

Thx

Comments

  • KeithBKeithB Member Posts: 7
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by DesmedtS:
    <STRONG>How can i let a subform show the records of a temporary table (defined in globals as record with property temporary = yes)

    Thx</STRONG><HR></BLOCKQUOTE>

    To do this you must first have designed a form to display the contents of the permamnent table in the normal way. Then you need to run the form from the place in code where you have your temporary table using the FORM.RUN command and passing the tempoaray table as a parameter. Do not try to do this by declaring the form as a variable and then using the SETTABLEVIEW command as this will not work.
  • pdjpdj Member Posts: 643
    The suggestion from keithb can afaik not be used in a subform?

    Take a look at Form 344 and the triggers OnFindRecord and OnNextRecord.
    You should make a function in the subform that can copy the temptable from the mainform to the subform. Then you just need to copy the code from the two triggers in form 344.
    Please note that a simple TempRec1 := TempRec2 only copies one instanse and not the entire temptable. You need to start by flushing the subforms temptable, and then copy them one by one.
    Regards
    Peter
Sign In or Register to comment.