Filter problem on form

Lindie
Lindie Member Posts: 4
Hi,

I'm having a problem with a form that uses a temporary table to show the output. We discovered that the sort and filter(f7) functions don't work. At the bottom it says that the filter is applied, but the data doesn't changed.

Anyone have any idea of how to fix this?
The temporary table gets filled in the onopenform method.

Thanks
Lindie

Comments

  • kine
    kine Member Posts: 12,562
    You need to COPY the filters and sorting from Rec to your temporary variable before you get the data from temp table (in OnFindRec etc...)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kriki
    kriki Member, Moderator Posts: 9,132
    This is what Kine means:

    OnFindRecord:
    tmpTheTable.COPY(Rec);
    blnFound := tmpTheTable.FIND(Which);
    Rec := tmpTheTable;
    EXIT(blnFound);
    

    OnNextRecord:
    tmpTheTable.COPY(Rec);
    intResultSteps := tmpTheTable.NEXT(Steps);
    Rec := tmpTheTable;
    EXIT(intResultSteps);
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Lindie
    Lindie Member Posts: 4
    Thanks for your reply's.

    There already was some code in the methods, but I adjusted them to the examples. This did help for the (f7) function, but the search function where you just start typing is still not responding.

    Any ideas on what else could be missing?

    Thanks
    Lindie
  • pekl
    pekl Member Posts: 1
    Hi,

    the easiest Solution would be to start the form with the following Code.

    **Fill TMP Table **
    FORM.RUN(0,TMPTable);


    Then you should not have any Problems.

    Regards

    Peter
    Peter Klittich
    Competence Center Pearle Europe
  • Lindie
    Lindie Member Posts: 4
    Thanks for the reply.

    I don't think it's possible to change the code for the run though, because the form is used as a drilldown and lookup for a table too, and it's used at allot of places in the system.

    To solve the (F7) problem I also added the following code to the OnBeforePutTriger:

    _ServiceItemTempRec.SETVIEW(Rec.GETVIEW);

    I looked through the functions but could not find anything for the find function.

    Anyone have any suggestions?