FILTERGROUP and RUNMODAL
Belias
Member Posts: 2,998
hi everyone, i have a little problem with filtergroup...i can't get it work using this code:
CLEAR(TBPTSDescr); CLEAR(FRMPTSDescr); TBPTSDescr.FILTERGROUP(10); IF "Phase Code" <> '' THEN TBPTSDescr.SETRANGE(Phase,"Phase Code"); IF "Task Code" <> '' THEN TBPTSDescr.SETRANGE(Task,"Task Code"); IF "Step Code" <> '' THEN TBPTSDescr.SETRANGE(Step,"Step Code"); FRMPTSDescr.SETTABLEVIEW(TBPTSDescr); FRMPTSDescr.SETRECORD(TBPTSDescr); FRMPTSDescr.RUNMODAL; TBPTSDescr.FILTERGROUP(0);thanks in advance
0
Answers
-
Hi
For form need use group 2 - command TBPTSDescr.FILTERGROUP(2);CLEAR(TBPTSDescr); CLEAR(FRMPTSDescr); TBPTSDescr.FILTERGROUP(2); IF "Phase Code" <> '' THEN TBPTSDescr.SETRANGE(Phase,"Phase Code"); IF "Task Code" <> '' THEN TBPTSDescr.SETRANGE(Task,"Task Code"); IF "Step Code" <> '' THEN TBPTSDescr.SETRANGE(Step,"Step Code"); TBPTSDescr.FILTERGROUP(0); ... FRMPTSDescr.RUNMODAL;
0 -
:-k this is not true...you can use every number for filtergroups...it's not compulsory (and also not recommended) to use no.2 filtergroup, because MS use this group and you can interfere with itYaroslav Gaponov wrote:Hi
For form need use group 2 - command TBPTSDescr.FILTERGROUP(2);0 -
Hi
Yes You can use any group but for forms only 2
From help:
2 Form Used for the filtering actions that result from the SETTABLEVIEW function; from the SourceTableView property; and from the DataItemTableView property.0 -
I extracted this directly from the online help...This means that a filter set in a group different from FILTERGROUP 0 cannot be changed by a user that uses a filter dialog to set a filter. If, for example, a filter has been set on customer numbers 1000..2000 in group 4, the user can set a filter that delimits this selection further, but cannot widen it to include customer numbers outside the range 1000..2000.
It is possible to use one of the internally used groups from C/AL. If you do this, keep in mind that in this way, you will replace the filter that C/SIDE assumes is in this group. If, for example, you use FILTERGROUP 4 in a form, you will replace the filtering that is actually the result of applying the SubFormLink property. This could seriously alter the way forms and subforms interact.0 -
Yes
You right
Sorry ](*,)
Try thisCLEAR(TBPTSDescr); CLEAR(FRMPTSDescr); TBPTSDescr.FILTERGROUP(10); IF "Phase Code" <> '' THEN TBPTSDescr.SETRANGE(Phase,"Phase Code"); IF "Task Code" <> '' THEN TBPTSDescr.SETRANGE(Task,"Task Code"); IF "Step Code" <> '' THEN TBPTSDescr.SETRANGE(Step,"Step Code"); TBPTSDescr.FILTERGROUP(0); FRMPTSDescr.SETTABLEVIEW(TBPTSDescr); FRMPTSDescr.RUNMODAL;
0 -
Likely NAV make same code

CurrGroup := rec.FILTERGROUP; for i := 0 to MaxGroup do if i <> CurrGroup then SetHideFilter() else SetFilter();0 -
:shock: where's this code? i can't understand it...Yaroslav Gaponov wrote:Likely NAV make same code
CurrGroup := rec.FILTERGROUP; for i := 0 to MaxGroup do if i <> CurrGroup then SetHideFilter() else SetFilter();
anyway...solved!0 -
It means that user can see filters in current filtergroup.If you didn't set the filtergroup back to 0, user can see filters in filter group 8 or 2 or another one you used last time... it is good practice to set it back to 0 because that...0
-
Belias wrote:ok, and where i can find this code in std NAV?
Nowhere... it was only example how it works "inside" the C/Side... ;-)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 323 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
