How to Setfilter <>''

mspellman
Member Posts: 6
I'm trying to set a filter for records where the field is not ''. I have tried SETFILTER(field,'<>%1','') and this does not return any records. Is there a way to do this?
TIA,
Mike
TIA,
Mike
0
Comments
-
Hi,
can you try to use
SETFILTER(field,'<>%1','''''')
in your code:
The first is for starting the text, the second one to mask the third one, the forth to mask number 5 and the 6th and last one to close the string.
HTH,
Rainer0 -
Sorry, but easiest is
SETFILTER(field,'<>%1','')
if you use the format IHateLinux wrote, you will filter for all values different from "two apostrophes" value. This syntax can be used only if it is part of the second parameter for the SETFILTER - it means when you use something likeSETFILTER(field,'<>''''''')
than it can work... but this is not good example....0 -
I tried both
SETFILTER(field, '<>%1',' ')
andSETFILTER(field, '<>%1,'''''')
Neither one is accomplishing what I want. I'm trying to filter for records with any value in the field. I want to filter out NULL('') values. Any other ideas?
Thanks,
Mike0 -
Actually code SETFILTER(field,'<>%1','') should work because it works
You missing these records or something else.0 -
SETFILTER(field, '<>%1',' ')
you really inserted a space between quotemarks?if so, toggle it.
otherwise, are you filtering the same variable you're showing/processing?
also, try debug, view the filters on the record variable before and after the instruction above0 -
The space between the apostrophes is your problem... ;-)0
-
Be careful with using "not equal to" filters. These can cause performance issues with larger tables as they will result in table/index scans.There are no bugs - only undocumented features.0
-
Thanks for the help.
Apparently I had it right the first time (without the space between the apostophes).
There was a typo in my other filter statement :oops:
Thanks again!0
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