Options

How implement "or" filters in forms by code

DduranDduran Member Posts: 22
Hi,

I want open job card form filtered by two fields but with “or” conditions. For example the code of department “dep1”, or the code of Person Responsible “resp2”. Until now I have done looking for it and mark os with the mark (true) intrucción and then opening the form with Markedonly.

Do you Know a better solution?

Thanks :roll:

Comments

  • giulio.cipogiulio.cipo Member Posts: 77
    i don't know if is better but standard sometimes use this solution (e.c - in item tracking):

    insert record in a temporaly table and pass it to the form
  • kinekine Member Posts: 12,562
    Yes, there are just two ways: Temp table and marks...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    There is a third way: http://mibuso.com/dlinfo.asp?FileID=515

    But, this is simply not the right way to go. Rather, you should create a boolean or option field and update it whenever it is appropriate, forever, in you case, in the OnValidate of person responsible and dept. And then just filter for it.
  • kinekine Member Posts: 12,562
    But, this is simply not the right way to go. Rather, you should create a boolean or option field and update it whenever it is appropriate, forever, in you case, in the OnValidate of person responsible and dept. And then just filter for it.

    But do not do it for example when form is opening etc. else you can have big problem with performance and locking... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.