Filter Data not to be included in Location List

vasilis6669
Member Posts: 109
Hi,
How can i filter some location List not to be included on a particual report?
Thanks,
Vasilis
How can i filter some location List not to be included on a particual report?
Thanks,
Vasilis
0
Answers
-
Filter it by Code or by the user entering filters on the request form?
Can you give us a bit more detail?0 -
My mistake is not for a report is for a form.
In the form there is the option to select location code. From the location code list i do not want to view some values from the list. Alos,I do not want to disable the location for all the forms.
So, if there is logic:
1) If the location list is opened by form 'SalesReport'
2) Filter Location Code <>Store1|Store2
vasilis0 -
Declare a Variable LocRec (Record, Location) and LocForm (Form, Location List);
Then in the OnLookup trigger write:CLEAR(locForm); // Here you cann apply any filter you need locform.SETTABLEVIEW(locRec); locform.LOOKUPMODE(TRUE); IF locform.RUNMODAL = ACTION::LookupOK THEN BEGIN locform.GETRECORD(locRec); VALIDATE("Location Code",LocRec.Code); END;
0 -
ok, but how do i filter with data not to be included in the location list. I do not know the sytax
Location.SETFILTER(Code,not 'Store1'|'Store2');
Euxaristo,
vasilis0 -
You can do the following:
Location.SETFILTER(Code,'<>%1&<>%2&<>%3',Store1,Store2,Store3);
But I would add a new field and filter based on this because a filter like the one above can cause a runtime error if the length exceeds a certain number of characters...
The above filter tells the system to show only the records that are Not Store1 AND Not Store2 And NOT Store3...
You can read the online help for more information on applying filters...0 -
ok thanks,
i used Location.SETFILTER(Code,'<>Store1|Store2|Store3|Store4|Store5');
vasilis0 -
vasilis6669 wrote:i used Location.SETFILTER(Code,'<>Store1|Store2|Store3|Store4|Store5');
Is this what you want????
This will exclude ONLY Store1... which is equal to saying:
Location.SETFILTER(Code,'<>Store1');0 -
Yes, you are right. It did not check the other values.
Thanks0 -
for Location.SETFILTER(Code,'<>%1&<>%2&<>%3',Store1,Store2,Store3);
I meet an error message which says a maximum of 12 parameters must be used....
So I think the limit may be 12 parameters. Thank you.0 -
You can do this with the MARK function to iteratively select the records you want to view and then use MARKEDONLY to view only those records.
Hopefully you don't have a lot of records in your location table.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