I am new to the Navision C/AL code so am learning this as I go along. I am trying to use the SETFILTER option but have noticed that there is a limit to how much code can be put on one line. I simply tried to continue it on a new line but I get a syntax error. The maximum code it lets me enter one line is,
SETFILTER("Customer No.",'<>CA16&<>CO05&<>EU05&<>EU100&<>EU101&<>EU102&<>EU11&<>EU21&<>EU26&<>EU28&<>EU30&<>EU36&<>EU44&<>EU46
On the next line it continues,
&<>EU47&<>EU72&<>EU79&<>EU92&<>GF04&<>IN14&<>IN17&<>IN26&<>IN53&<>IT08&<>RE42&<>TI04&<>TL01&<>TR27');
If I just use this which fits on the one line it compiles fine.
SETFILTER("Customer No.",'<>CA16&<>CO05&<>EU05&<>EU100&<>EU101&<>EU102&<>EU11&<>EU21&<>EU26&<>EU28&<>EU30&<>EU36&<>EU44&<>EU46');
Any help here would be greatly appreciated.
0
Comments
SETFILTER("Customer No.",'<>CA16&<>CO05&<>EU05&<>EU100&<>EU101&<>EU102&<>EU11&<>EU21&<>EU26&<>EU28&<>EU30&<>EU36&<>EU44&<>EU46' +'<>EU47&<>EU72&<>EU79&<>EU92&<>GF04&<>IN14&<>IN17&<>IN26&<>IN53&<>IT08&<>RE42&<>TI04&<>TL01&<>TR27');
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I have no documentation or help files so what is MARK ? do you have an example or a link to another forum ?
Saying that a link to any help with syntax on Navision Attain would be a god-send. I can't seem to find any literature to help me out.
Also in code hit F5 and look for all the variables. As for code examples, the whole navision is open.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
SETFILTER("Invoicee Role",'APP - EXT FLEET MGMT|CAT|EXT|EXT FLEET MGMT|EXTERNAL FLEET MGMT|FLEET MANAGEMENT|FLEET SERVICES'
+'FRANCHISEE|LEASE CO. (FIXED PR)|LEASE COMPANY|MANU (FIXED PR)|MANUFACTURER|OTHER|WARRANTY');
It compiles fine but when I run it I get the error,
"The filter 'APP - EXT FLEET MGMT|CAT|EXT|EXT FLEET MGMT|EXTERNAL FLEET MGMT|FLEET MANAGEMENT|FLEET SERVICES|'FRANCHISEE|LEASE CO. (FIXED PR)|LEASE COMPANY|MANU (FIXED PR)|MANUFACTURER|OTHER|WARRANTY' is invalid.
You entered an inavlid expression in the filter....
Do I need to enter anything different when using filters with spaces, fullstops, etc ?
I strong suggest to use Mark.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
So another train of thought was if these customer/vendors all have something in common you can try & group them in another way either using say dimensions or creating you'r own custom field.
Then you can filter on that really easily.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Oleg