Filtering the Subform

gulamdastagir
Member Posts: 411
I have a Main form with source table X which includes a subform with Source Table X.
There is Date filter on the Main Form and whenver i enter the date the subform should show the filtered results
Thanks
There is Date filter on the Main Form and whenver i enter the date the subform should show the filtered results
Thanks
Regards,
GD
GD
0
Comments
-
You can link the Date Filter fields on SubFormLink.Ufuk Asci
Pargesoft0 -
date filter is not a field its just a variable of type text to get the date range from the user for filtering the subformRegards,
GD0 -
gulamdastagir wrote:date filter is not a field its just a variable of type text to get the date range from the user for filtering the subform
Then you can create a function in the subform like SetDateFilter which gets DateFilter as parameter. On the mainform call SubForm's SetDateFilter function on OnValidate and use a CurrForm.UPDATE on OnAfterValidate.
If not clear, I can send you an example object.Ufuk Asci
Pargesoft0 -
:whistle: this is cool ufukRegards,
GD0 -
when i enter the date into the Date filter textbox it filters the subform fine but when i clear the Date Filter it does not remove the filter from the subformRegards,
GD0 -
gulamdastagir wrote:when i enter the date into the Date filter textbox it filters the subform fine but when i clear the Date Filter it does not remove the filter from the subform
The code in the function of the subform must be something like this:IF IdatTheDateFromTheHeader = 0D THEN SETRANGE("Some Date") // this will remove the filter ELSE SETRANGE("Some Date",IdatTheDateFromTheHeader); CurrForm.UPDATE(FALSE);
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
ufuk wrote:You can link the Date Filter fields on SubFormLink.
This works when the fields are of date but if they are boolean it doesnt work for eg
when i set the subformlink property as below:
TE FIELD TE FILTER
IPE FIELD IPE FILTER
TE,IPE Datatype Bool,fieldclass :Normal
TE Filter,IPE Filter Datatype bool,fieldclass :Flowfilter
thanks kriki,ufukRegards,
GD0 -
I don't have problem with boolean type flowfilters. Have you checked your flowfield? (it must include boolean type flowfilter) If ok, then maybe you can try a calcfields.
Edit: Sorry, you say that TE, IPE field is normal. But flowfilters are used to filter flowfields. So you can make some modification like changing your field type to flowfield or you can filter your field by a variable.Ufuk Asci
Pargesoft0
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
- 320 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