Filter

Kaktus
Member Posts: 2
I need filter which choose records, which begins from letter "x" and exclude word "sort".
It must looks like this, i think: x*&<>*sort*
Help, pls
If RTFM - pls give me url of TFM. :-)
It must looks like this, i think: x*&<>*sort*
Help, pls
If RTFM - pls give me url of TFM. :-)
0
Comments
-
You can do it with 2 consequtive filter. So, first filter for the x*, the filter for <>*sort*
The code looks like this:
rec.SetFilter(field, 'x*');
rec.SetFilter(field, '<>*sort*');
if rec.FIND('-') then ....
Take into consideration, that filtering in Navision is case sensitive!Kaktus wrote:I need filter which choose records, which begins from letter "x" and exclude word "sort".
It must looks like this, i think: x*&<>*sort*
Help, pls
If RTFM - pls give me url of TFM. :-)Brg,
--
János Borsics0 -
borsicsj wrote:You can do it with 2 consequtive filter. So, first filter for the x*, the filter for <>*sort*
The code looks like this:
rec.SetFilter(field, 'x*');
rec.SetFilter(field, '<>*sort*');
if rec.FIND('-') then ....
Take into consideration, that filtering in Navision is case sensitive!
Hi!
If the "field" is the same in both SETFILTER commands, then the second is overrung the first one, so only the second filter is used.
And I think that there are some problems with <>*sort*. I try to set this kind of filter before and never done it. As I remember I had always used only *something* filter or *something1*|*something2*..
Casesenistivity can be solved using @ in the beging of the filter.
bostjanl0 -
Hi!
You are Right! I hope that in 3.6 it's implemented, but I tried and unfortunately NOT. The only way to disclose the records containing 'sort' in the field is the following:
rec.setfilter(field, 'x*');
if rec.find('-') then
repeat
if strpos(rec.field, 'sort') = 0 then begin
//do what you want,
//you can mark the fields and then using MARKEDONLY
end;
until rec.next = 0;bostjanl wrote:borsicsj wrote:You can do it with 2 consequtive filter. So, first filter for the x*, the filter for <>*sort*
The code looks like this:
rec.SetFilter(field, 'x*');
rec.SetFilter(field, '<>*sort*');
if rec.FIND('-') then ....
Take into consideration, that filtering in Navision is case sensitive!
Hi!
If the "field" is the same in both SETFILTER commands, then the second is overrung the first one, so only the second filter is used.
And I think that there are some problems with <>*sort*. I try to set this kind of filter before and never done it. As I remember I had always used only *something* filter or *something1*|*something2*..
Casesenistivity can be solved using @ in the beging of the filter.
bostjanlBrg,
--
János Borsics0
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