Using getfilter on "onopenpage" Trigger
Dean_Axon
Member Posts: 193
Hi All;
I need some guidance or maybe some idea of how 2009 r2 is dealling with this.....
I have the following code in the OnInit() and OnOpenPage() triggers of the item list page (31)
However, the list IS filtered by "my filter" as the returned results are filtered.
The List page itself is called from the Lookup of the "No." field on the purchase order page with the filter applied to the TABLERELATION something like this.
ANY IDEAS ???? ](*,)
TIA
Dean
I need some guidance or maybe some idea of how 2009 r2 is dealling with this.....
I have the following code in the OnInit() and OnOpenPage() triggers of the item list page (31)
Message(GetFilter("My Filter"));
But no matter which trigger I place this code in, the message returns no value.However, the list IS filtered by "my filter" as the returned results are filtered.
The List page itself is called from the Lookup of the "No." field on the purchase order page with the filter applied to the TABLERELATION something like this.
IF (My Field=CONST(Yes),Type=CONST(Item)) Item WHERE (My Filter=CONST(Yes))
ANY IDEAS ???? ](*,)
TIA
Dean
Remember: Keep it simple
0
Comments
-
You can not use FlowFilter Field in this way, i.e. in table relation, you have to use SETFILTER to set Filter, Because it is not stored in record. as well as FlowFilter used to Filter Values, or calculate Fields, not for FIlter records.Uday Mer | MS Dynamics NAV Techno-Functional Consultant0
-
you have to change the filtergroup before the getfilter command.
so for examplefiltergroup(2); message(getfilter("field on which has been filtered"); filtergroup(0);
you'll have to check the help on which filtergroup to use, the used filtergroups go up to 6 in c/side.0 -
Hi Guys,
Thanks for the 2 suggestions so far:
Uday - It works in classic client in the OnOpenForm() trigger, so i was hoping that the Page type object did the same in OnOpenPage() [-o<
Geronimo - Unfortunately this did not make any difference by using filtergroups first.
DeanRemember: Keep it simple0 -
Hi Dean
In Pages you might need to use FILTERGROUP(4) to see the filter in the OnOpenPage trigger.________________________________
Gunnar Gestsson
Microsoft Certified IT Professional
Dynamics NAV MVP
http://www.dynamics.is
http://Objects4NAV.com0 -
I don't think the role of Filtergroup in this case, Different filtergroups are used that how you are applying filter to a record pointing to the table with which you want to work.0
-
Hey Gunner,
I've tried 1 through 6 (just for testing) and none of them gave me the results :x
Having re-read the help file, I would have expected 4 to work ???
Thanks
Dean.Remember: Keep it simple0 -
Well Dean, at least it has worked for me.
How do you apply the filter before opening the page ?
If you are using RunFormLink for page this should be filtergroup 4.________________________________
Gunnar Gestsson
Microsoft Certified IT Professional
Dynamics NAV MVP
http://www.dynamics.is
http://Objects4NAV.com0 -
Have you already checked the "About this Page"?
In tab "Filters" you should be able to see at which level the filter is placed.~Rik~
It works as expected... More or Less...0 -
Hi Dean,
may i know "My Filter" is FlowFilter or normal Field ?Uday Mer | MS Dynamics NAV Techno-Functional Consultant0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K 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
- 322 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