Can Anybody guide me regarding the filtergroups. I read the posts regarding the filtergroups. I don't understand where the filtergroups are defined.
For example, I use
FILTERGROUP(X);
<Some codes>
FILTERGROUP(0);
Where is the filtergroup(X) defined. I have never used the filtergroup. Please tell me in what situation to use filtergroup and how do we define and use the filtergroups.
Sorry if my question is wrong but I want to know more about the filtergroups than shared in the forum itself. I read all posts.
0
Comments
filtergroups(2), only the filters of SETTABLEVIEW , SourceTableView and DataItemTableView property will be activated and when we apply filtergroups(0), all the filters are activated.
But later some people are saying not to use the internal groupfilters of Navision. They say, use groupfilters more than 6. What does that mean? I could not find any groupfilter(>6) anywhere, where do I find it (the definition) or define it?
TBa.Filtergroup(2);
TBa.setfilter...
TBa.setrange...
TBa.Filtergroup(0);
and everything have gone well up to now...
with this instruction you can set unremovable filter on a table, for example when you want to show only some records in a form...remember to use the same variable to filtergroup and setfilter/setrange
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
But I want somebody expert to put more light on this topic like David Singleton, Kirki, Van Dyck or Erik. I also welcome help from other people.
Kindly give me a more information regarding this, all experts.
Extract from help
I have already read that in help file. I wanted to know how we create new filtergroup and how to use them as an example.
There's really not much to it.
Rec.FILTERGROUP(10);
Rec.SetMyFilters;
Rec.FILTERGROUP(0);
Now they see what you tell them to see, nothing more. They can limit it all they want from there, but the filters YOU set will never be removed.
Don't we all.
Epimatic Corp.
http://www.epimatic.com
This codeunit is called when you open the General Journal, Sales Journal, etc.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Everyone that contributes is an expert one way or the other. The only difference between people who are the MVPs and people who are not is that the MVPs are addicted to the forums. Nothing more.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Hey, I am jealous...
anyway:
You can imagine filter groups as different layers of filters on the record. Each layer is independent on other layers. Resulting filter is INTERSECTION of all the layers. User can change only filters in layer 0. Other layers are used for filters from different sources. You can define filter in form properties (one layer), you can define filter when you use the form as subform (another layer), you can define additional filter through C/AL code, etc. and you want to apply all that filters together. It is why the FILTERGROUPS are used. The number of the filtergroup is just no. of the layer in range 0..255.
It means you can prevent user to remove your filter by setting that filter in another filtergroup than 0, where it is by default.
Or you can use filtergroup to make intersection of different filters on same field by setting them in different filtergroups.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I couldn't have better defined a Dynamics NAV MVP!
And this probably also is valid for all other MVP's.
Oh, I would almost forgot this: http://www.mibuso.com/forum/viewtopic.php?t=16659
And if you search for "FILTERGROUP" and for author "kriki", you will find other posts about filtergroups.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Feeling ignored
May be a junior functional is not good enough........
http://ssdynamics.co.in
I just wanted to say anyone who can give me more advice this issue like david is known for detailed explanation, that's it. I just wanted somebody to explain me more on this issue that's it. There was no other intention of making anybody inferior, ok?
At first, I calculate the current filtergroup; after that, I apply a filtergroup using a number > 6, so no one can remove the filter. And finally, I apply the FilterGroup it had before doing my own filters.
intCurrentFilterGroup:=Rec.FILTERGROUP;
Rec.FILTERGROUP(10);
Rec.SetMyFilters;
Rec.FILTERGROUP(intCurrentFilterGroup);
In this manner I'm always sure I don't interfere with standard behavior, and make my filters invisible and irremovable by the user. I have had good results always doing in this manner.
I think in filtergroups like work spaces where we can apply filters. The help says numbers 0 to 6 are used or reserved to use internally, so I don't use these numbers. Filtergroup 0 is visible and changeable by the user.
Perhaps, I'm doing an extra job calculating the current filtergroup, I'm not sure, but it works well for me.
So better start from 10 (in case they decide to add other reserved filtergroups)
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
On the
Dynamics Book Wiki there is this page about filter groups that may help you.
Filter groups in NAV - Dynamics
Dears,
There is one thing I'm confused, why we always set a filtergroup 2 then go back to filtergroup 0 immediately...... :?
...this is only an example...
between TBa.Filtergroup(2); and TBa.Filtergroup(0); there are only filters you don't want the user to remove...
BTW: reading this thread, you surely learnt (as I do) that is better to use filters with nr. >6 (e.g. 10) in order to not interfere with standard...
in this example, in the resulting list form with these filters applied, if the user presses ctrl+shift+f7, he will toggle only the last filter (surname).
also if he presses ctrl+f7 he will only see the surname filter line...(and other eventual filters he applied)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thanks Kine,
So it's mean we'll probably set filtergroup back to 10 while we want to use it again? It's also can prevent user change the filtergroup by tool bar or something.....? :-s