Apply filter on form to determine the view of the source tab
nalinee
Member Posts: 55
Hi,
Can anyone tell me how to apply a filter on a form to exclude lines where for example Column 1 and Column 2 are null?
On the SourceTableView Property, when I am filtering
Column 1-Filter-<>'', Column 2-Filter-<>'',
it is filtering with OR condition and not with AND condition.
Thx for quick reply.
Rgds
Nalinee
Can anyone tell me how to apply a filter on a form to exclude lines where for example Column 1 and Column 2 are null?
On the SourceTableView Property, when I am filtering
Column 1-Filter-<>'', Column 2-Filter-<>'',
it is filtering with OR condition and not with AND condition.
Thx for quick reply.
Rgds
Nalinee
0
Comments
-
Your first sentence "Can anyone tell me how to apply a filter on a form to exclude lines where for example Column 1 and Column 2 are null? " says AND and next senetences say OR.
What do you exactly want to do?0 -
I want to exclude lines with AND condition (Column 1 and Column 2 = null) not OR condition.
But the while I m trying to filter with SourceTableView Property, it is doing it with OR condition.0 -
did you consider setting the required filter using SETFILTER in the Form - OnAfterGetRecord() trigger?Regards,
GD0 -
nalinee wrote:it is filtering with OR condition and not with AND condition.
It is filtering like it would if you apply filters to your table.gulamdastagir wrote:did you consider setting the required filter using SETFILTER in the Form - OnAfterGetRecord() trigger?
When applying as a standard view it should be coded on open form. That way you can still see all entries if you remove the filter.0 -
Mbad wrote:nalinee wrote:it is filtering with OR condition and not with AND condition.
It is filtering like it would if you apply filters to your table.gulamdastagir wrote:did you consider setting the required filter using SETFILTER in the Form - OnAfterGetRecord() trigger?
When applying as a standard view it should be coded on open form. That way you can still see all entries if you remove the filter.
yeah you can aslo do that to see two empty columns on the formRegards,
GD0 -
Please see if table filters on the form with value not equal to null works.Mukesh Sharma0
-
What I need to do is to be able to set filter on two fields to test that both are null.
SETFILTER(column1, <> '')
SETFILTER(column2, <> '')
has an OR operand.
What I need is an AND operand. How can this be done?0 -
OnAfterGetRecord Trigger:
if (column1= '')and(column2='') then
Message('%1','C/AL is a Piece of Cake');Regards,
GD0 -
What is required is not to display those records which have column1 AND column2 empty in a FORM.
I tried to put the filter on the form property with the settableview attribute BUT navision is not dispalying all records which has EITHER column1 OR colum2 as empty which not what I need. Only records which have both colum1 AND column 2 as empty should be filtered.
Is there a command which I can use to skip those records if column1 = '' AND column 2 = '' in the onaftergetrecord trigger?0 -
Please use the following filter on your source view table:-
WHERE("First condition"=FILTER(<>0),second condition=FILTER(<>0))Mukesh Sharma0 -
Nalinee
your setting up wrong filters [-X
instead of using '<>' u shud go for '=',in the SourceTableView property of the form
WHERE(Column1=FILTER(=''),Column2=FILTER(=''))Regards,
GD0 -
nalinee wrote:What is required is not to display those records which have column1 AND column2 empty in a FORM.
You cannot do it with filters. You can do it with mark.
In the OnOpenForm trigger you can loop through the Rec, and MARK the records, which have to be displayed.IF FINDFIRST THEN REPEAT MARK((Field1 <> '') AND (Field2 <> '')); UNTIL NEXT = 0; MARKEDONLY(TRUE)0 -
Nalinee, is your problem sorted out??Mukesh Sharma0
-
Hi,
The solution is fine for a small database. The filter column 1 = empty AND column 2 = empty represent less than 1% of the records that need to be excluded in the display.
So marking the 99% of the records in a huge table is not practical and very time consuming.
please advise.0 -
Hello,
that's right... An other solution could be, to put a new field in to the table ("Fields Empty" - Boolean), and fill the field in the OnValidate triggers of your fields. Than you can create an index on this field, and filter on the form.0 -
Can anyone propose something on this issue plz???
My problem is still pending.
Thx0 -
have you tried:
setfilter(field1,'<>' + '''''');
setfilter(field2,'<>' + '''''');
in the OnOpenForm-Trigger?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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