(SETFILTER) OR (SETILTER) possible ?
KAD
Member Posts: 2
I would like to combine record level Filter by OR Statements, so i can get all Records that satisfy any of the following statements
SETFILTER(No.,myDocno)
OR SETFILTER(Customer Quote No.,myQuoteNo)
OR SETFILTER("Customer Order No.",myOrderNo)
if written in SQL it would look something like this:
Select From ...WHERE ("No."=?) OR ("Customer Quote No."=?") OR "Customer Order No."=?);
Is it possible without temporary tables or SQL-Views/Stored procedures ? ](*,)
SETFILTER(No.,myDocno)
OR SETFILTER(Customer Quote No.,myQuoteNo)
OR SETFILTER("Customer Order No.",myOrderNo)
if written in SQL it would look something like this:
Select From ...WHERE ("No."=?) OR ("Customer Quote No."=?") OR "Customer Order No."=?);
Is it possible without temporary tables or SQL-Views/Stored procedures ? ](*,)
0
Comments
-
Yes it is possible.
Table.SETFILTER("No.",myDocno); if Table.findset (Table.find('-')) then begin repeat Table.mark(true); until Table.next = 0; end; Table.setrange("No."); Table.SETFILTER("Customer Quote No.",myQuoteNo); if Table.findset (Table.find('-')) then begin repeat Table.mark(true); until Table.next = 0; end; Table.SETRange("Customer Quote No."); Table.SETFILTER("Customer Order No.",myOrderNo); if Table.findset (Table.find('-')) then begin repeat Table.mark(true); until Table.next = 0; end; Table.SETRange("Customer Order No."); Table.markedonly(true); form.runmodal(Form::XYZ,Table);
@ALL
I've got the feeling, that the SQL not like mark. (Performance)
Regards
GarakDo you make it right, it works too!0 -
Search the forum, many posts about OR between fields filters... :-)0
Categories
- All Categories
- 75 General
- 75 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
