Temp Table will not clear/reset

mcurriemcurrie Member Posts: 39
edited 2005-06-30 in Navision Financials
I am trying to run a program from the item card form that updates a temporary table and then produces a form based on the temporary table. The issue that I'm having is getting the temporary table to clear out after I exit the form.

Here is the example:
I run the program for the first item and it produces the data i need on the form :D . I exit the form and end up back on the item card. I scroll through and find my next item and re-run the program. This produces the data I need for the current item along with the data from the previous item :( . Here's the odd part, if I exit the item card form and then go back in before I re-run the program everything is fine.

I've tried too many things to list them all.
-Deleteall function on the temp table from the form as I exit, Deleteall from the item card as I return there.
-Properties (Savetableview,Savevalues, etc.) on the form.
...many many more... ](*,)

If anyone has encountered this issue before please let me know. The help would be greatly appreciated.

Comments

  • kinekine Member Posts: 12,562
    What about deleteall on the temp table before you fill it... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • mcurriemcurrie Member Posts: 39
    Yes. Did that too.

    Its almost like it keeps it in memory until I exit the item card form.
  • kinekine Member Posts: 12,562
    If you will fill it only on init or somewhere else, you must use CLEAR on the Form variable, if you want the form behaive each call as new one...

    something as:
      CLEAR(FormVar);
      FormVar.SETDATA(Param1,Param2)
      FormVar.RUN;
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • mcurriemcurrie Member Posts: 39
    I swear I tried it before but it worked this time.

    Can't thank you enough!!!
  • jreynoldsjreynolds Member Posts: 175
    It sounds like the temporary table is declared globally on the item card. If this is the case then you could declare the temporary table locally in the function that updates it and display your form.
Sign In or Register to comment.