Filters and Zup file

garth
Member Posts: 25
In any form, if you apply a filter with a search string, which returns no records and you exit the form before clearing the filter, you are no longer able to open that form unless you first delete the ZUP file.
Is there a way around this that does not involve putting reset in OnOpenForm of every single form?
Thanks,
Garth
Is there a way around this that does not involve putting reset in OnOpenForm of every single form?
Thanks,
Garth
0
Comments
-
No, there is no "One click solution" for all forms. You can only add some code into the form which will reset the filters when nothing is found (look into some standard card form and you can see code like
Form - OnFindRecord(Which : Text[1024]) : Boolean RecordFound := FIND(Which); CurrForm.EDITABLE := RecordFound OR (GETFILTER("No.") = ''); EXIT(RecordFound);
orForm - OnFindRecord(Which : Text[1024]) : Boolean IF FIND(Which) THEN EXIT(TRUE) ELSE BEGIN SETRANGE("No."); EXIT(FIND(Which)); END;
0 -
Normally, it should not be a problem to reopen the form. Once open, you click "Show All" to delete all filters.
In certain cases, it gives an error, but this is always because of some programming. You can fix this in several ways:
1)By putting the "SaveTableView"-property of the form to FALSE. But in this case, Navision will never save the filters in the zup-file.
2)In the OnOpenForm-trigger, you can putIF NOT FIND('-') THEN RESET;
This deletes the filters in case no record is found
3)Changing the Date or Time of the form. In this way Navision thinks it has been changed and does not re-use the filter-settings saved in the zup-file.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
This is standard functionality of Nav 4.01 (SP1)
You can get an upgrade...kine wrote:No, there is no "One click solution" for all forms. You can only add some code into the form which will reset the filters when nothing is found (look into some standard card form and you can see code likeForm - OnFindRecord(Which : Text[1024]) : Boolean RecordFound := FIND(Which); CurrForm.EDITABLE := RecordFound OR (GETFILTER("No.") = ''); EXIT(RecordFound);
orForm - OnFindRecord(Which : Text[1024]) : Boolean IF FIND(Which) THEN EXIT(TRUE) ELSE BEGIN SETRANGE("No."); EXIT(FIND(Which)); END;
0
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