How to filter correctly

Johannes_NielsenJohannes_Nielsen Member Posts: 206
Hi all

Running NAV 5.0 on SQL

Regarding Table 5065 "Interaction Entry Log"

Theres are entries of Interactions, which have an Template Code assigned. The Template Code is part of a Template Group.

We have a Template Group named "SYSTEM" which has several Template Code members.

I need in list Form 5076 "Interaction Log Entries" - to filter out ALL members of the SYSTEM Group except One specific Template Code.


:oops: I can't figure out how to do this.. :oops:
SETFILTER/RANGE operates solely on one specifik Field at a time.
Will I have to list all the members of the Group which I want to Filter out - except the One I want to show?

Maybe filter the table twice and join the results in a temporary table?

Any inputs are appreaciated
Best regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-841

Answers

  • dkonedkone Member Posts: 59
    Hi,

    Maybe you could create your filter dynamically...

    Something like :
    TemplateCode.SETFILTER("Template Group","System");
    TemplateCode.FINDFIRST;
    REPEAT 
     IF TemplateCode.Code <> "UnwantedCode" THEN
       FilterTextVar =  TemplateCode.Code + '|'
    UNTIL TemplateCode.NEXT = 0
    
    InteractionEntries.SETFILTER("Template Code",FilterTextVar);
    

    Or if it is used everywhere you can also add the Field "Template Group" in your table as a lookup flowfield and use standard table filter in your form. (Group = "System" AND Code <> "UnwantedOne")

    Hope this help,

    dkone.
  • Johannes_NielsenJohannes_Nielsen Member Posts: 206
    Hello dkone

    Thank you so much for your suggestions, I will try them out tomorrow! :thumbsup:
    Best regards / Venlig hilsen
    Johannes Sebastian
    MB7-840,MB7-841
Sign In or Register to comment.