SETRANGE & |
JKoB
Member Posts: 40
Hey!
How can i use SETRANGE with 2 criteria?
Present Code: SETFILTER("Location Code",'<>%1','Loc1');
Should be expanded to "Loc1|Loc2"
Thx in advance...
Jakob
How can i use SETRANGE with 2 criteria?
Present Code: SETFILTER("Location Code",'<>%1','Loc1');
Should be expanded to "Loc1|Loc2"
Thx in advance...
Jakob
0
Answers
-
SETFILTER("Location Code",'%1|%2','Loc1','Loc2');NAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0 -
you can't use setrange ;-) u must use setfilter.
setfilter(MyField,'%1|%2|%3','Bla','Blup','Gurkenrost'); //or setfilter(MyField,'Bla|Blup|Gurkenrost'); //or MyFilterstr := 'Bla|Blup|Gurkenrost'; setfilter(MyField,MyFilterStr);
follow also the link
viewtopic.php?f=23&t=26739
Regards
RegardsDo you make it right, it works too!0 -
Hmmm...
setfilter(MyField,'%1|%2|%3','Bla','Blup','Gurkenrost');
doesnt work...
cause i need the "<>" (<>hannover|Kröpke)
Setfilter was clear so far (just made a typing error)0 -
JKoB wrote:Hmmm...
cause i need the "<>" (<>hannover|Kröpke)
Hannover without the Kröpke? Never [-X :-D
use this:setfilter(MyField,'<>%1&<>%2','HannoverRules','Kröpke');
for the other example:setfilter(MyField,'<>%1&<>%2&<>%3','Bla','Blup','Gurkenrost');
RegardsDo you make it right, it works too!0 -
JKoB wrote:Hmmm...
setfilter(MyField,'%1|%2|%3','Bla','Blup','Gurkenrost');
doesnt work...
cause i need the "<>" (<>hannover|Kröpke)
Setfilter was clear so far (just made a typing error)
you are asking for not equal to ...Then try
SETFILTER(MyField,'<>%1|<>%2|<>%3','Bla','Blup','Gurkenrost')Now or Never0 -
That won't work, because Blup IS not equal to Bla, it will still pass. As stated in a previous post, you need to use <>%1&<>%2&<>%3navuser1 wrote:JKoB wrote:Hmmm...setfilter(MyField,'%1|%2|%3','Bla','Blup','Gurkenrost');
doesnt work...
cause i need the "<>" (<>hannover|Kröpke)
Setfilter was clear so far (just made a typing error)
you are asking for not equal to ...Then try
SETFILTER(MyField,'<>%1|<>%2|<>%3','Bla','Blup','Gurkenrost')0 -
MBerger wrote:
That won't work, because Blup IS not equal to Bla, it will still pass. As stated in a previous post, you need to use <>%1&<>%2&<>%3navuser1 wrote:JKoB wrote:Hmmm...setfilter(MyField,'%1|%2|%3','Bla','Blup','Gurkenrost');
doesnt work...
cause i need the "<>" (<>hannover|Kröpke)
Setfilter was clear so far (just made a typing error)
you are asking for not equal to ...Then try
SETFILTER(MyField,'<>%1|<>%2|<>%3','Bla','Blup','Gurkenrost')
Ouch.
BIG Mistake
Now or Never0 -
garak wrote:JKoB wrote:Hmmm...
cause i need the "<>" (<>hannover|Kröpke)
Hannover without the Kröpke? Never [-X :-Dsetfilter(MyField,'<>%1&<>%2','HannoverRules','Kröpke');
Regards
works pretty fine... Thx
last thing 2 say:
'<>%1&<>%2','Hannover','Kröpke' := '<>%1&<>%2','Hamburg','Reeperbahn' 8)
[Solved]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
