Filter

prancius
Member Posts: 12
Hello,
I have a question about filters.
For example i have opened table via (Object designer ->Select table -> Run)
For example table have colums a1, a2, a3
Is it possible to set filter where a1<>a2 ?
Regards,
Pranas
I have a question about filters.
For example i have opened table via (Object designer ->Select table -> Run)
For example table have colums a1, a2, a3
Is it possible to set filter where a1<>a2 ?
Regards,
Pranas
0
Comments
-
prancius wrote:
Is it possible to set filter where a1<>a2 ?
In which table & which fields you want to filter ?
Can you exlain with a example ?0 -
It is no difrence which table.
Just need to know is it possible to add filter using F7 or CTRL+F7 where column1 <> column2
Regards,
Pranas0 -
no you can't filter those columns...
if you've to do it only one time and there are not a lot of records, you can export the table to excel by copy/paste and do here the dirty job.
if you've to do it in a process, loop the entire table, test a1<>a2 and do the job:mytable.findset; repeat if a1 <> a2 then begin //asdf end else begin //dsfa end; until mytable.next = 0;
if it's user side (thus must be manually filtered), you've to think about evaluating a new boolean field to true if a1 <> a2
in this second option, basically you put your code in the onvalidate trigger of both a1 and a2 fields...but maybe there are other places, depending on your needs and from how the code is developed (maybe sometimes the VALIDATE is not done for these fields)0 -
Actually, with a flowfield trick you can do that.
Let's take the the T37:"Sales Line" as example.
The filter you want (in the example): Quantity <> Quantity Shipped.
You need to create new field "Value Is The Same" as a flowfield of type boolean.
give it this formula:
Exist("Sales Line" WHERE (Document Type=FIELD(Document Type),Document No.=FIELD(Document No.),Line No.=FIELD(Line No.),Quantity=FIELD(Quantity Shipped)))
now you can filter as this: SETRANGE("Value Is The Same",FALSE);
Remarks:
-flowfields are not so fast to filter on.
-in the formula, the first part of filtering must be done on ALL primary key fields because you need current record. And then you add a filter on the 2 fields you want to check.
-If they are the same, the record itself will be found and your flowfield will be true. If they are different, the flowfield will be false.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thank you all for answers. I have expected user friendly solution.
I know workarounds, but they not good for me.
Thank you, i got information which expected
Regards,
Pranas0
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