Opening a form with an active filter

CobaltSSCobaltSS Member Posts: 137
Hi all,

Here's another easy one. On Form A, the user has chosen for Field A a value of Code A from a table Table Z where Type is A. Table Z has this structure:
Code
Type
Category
In the next field, I want to open a lookup form, but I want to only see Code values where Type is B and the Category is the same Category as was chosen for Field A.

I'm pretty sure there's some built in function that will allow me to set a record filter and then pass the filtered record to a form, but C/Side help has remained surprisingly silent. I was thinking SETRECFILTER, but that seems to only apply to reports.

Any ideas greatly appreciated.

cheers,

Comments

  • idiotidiot Member Posts: 651
    Try something like this example
      
      // SalesOrder Form
      // SalesHeader Record
      SalesHeader.SETFILTER(whatever filters);
      SalesOrder.SETTABLEVIEW(SalesHeader);
      SalesOrder.SETRECORD(SalesHeader);
      SalesOrder.RUN;
    
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
  • MalajloMalajlo Member Posts: 294
    Or modify filters on second field. Like it is done in T:37, field No.
    If Item is selected, Item list is opened.
  • DenSterDenSter Member Posts: 8,305
    You can also include the filters in the table relationship, and the lookup form should automatically be filtered accordingly.
Sign In or Register to comment.