FilterGroup

hazemhazem Member Posts: 187
Hello
Can anyone please explain to me how to use this function?! I tried to learn to help but i didn't understand how could this function be useful? I found in some code Record.FilterGroup := 2 what does this mean?

Comments

  • KowaKowa Member Posts: 925
    FilterGroup(2) contains filters that the "normal" user will not be able to see or change, even if he clicks on View=>Show All. All filters set after this code line will still be active because they have become part of FilterGroup(2).
    A code line with FilterGroup(0) will enable to use filters again that can be changed by the user after the form is opened.
    Kai Kowalewski
  • krikikriki Member, Moderator Posts: 9,118
    It can also be used to put multiple (complex) filters on the same field.
    E.g. you need to put a filter 'a*|b*|c*' AND another '*x|*y|*z'.
    Together you don't always knows what will happen, so the trick is:
    SETFILTER("The Field",'a*|b*|c*');
    FILTERGROUP(6);
    SETFILTER("The Field",'*x|*y|*z');
    FILTERGROUP(0);
    
    With this you are sure that the 2 filters are used correctly.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.