GETFILTERS with description

Imre
Member Posts: 10
Hello ,
Is there any simple way to get filter with not the filtered key-code in any table but the description field from the table ?
example:
the filter is "LOCATION CODE = 110"
GETFILTERS give me back "LOCATION CODE: 110 "
but I need "LOCATION: Store1 in Budapest"
.. or I have to cut the filter string and find the description from the table ...
Thanks for the answer
Imre
Is there any simple way to get filter with not the filtered key-code in any table but the description field from the table ?
example:
the filter is "LOCATION CODE = 110"
GETFILTERS give me back "LOCATION CODE: 110 "
but I need "LOCATION: Store1 in Budapest"
.. or I have to cut the filter string and find the description from the table ...
Thanks for the answer
Imre
0
Comments
-
I am affraid you need to write some function for this.0
-
For example some function which will use RecordRef and FieldRef and TABLERELATION for doing that... it is not so hard... but I have no time for that now... ;-)0
-
What you can do is First take a variable with text filed eg loc
loc := "Table".GETFILTER("Location Code");
after that on pre section of the report where u want to keep it. Take the recordset of location table and setrange it with the "TABLE" and then if loc <> '' then through set range u get the name, this way u will be able to get the name,
same thing i did for Country too0 -
Something like this should work, but only for filtering one location :If Getfilter("Location code") <> '' then begin
if Location.get("Location code") then
Filtertext := Location.Tablecaption +':'+ Location.Description
else
error('A valid single location must be entered');
end;Kai Kowalewski0 -
I agree with Kowa. Anyway, I would catch this error somewhere earlier, because it is a little bit fragile solution. You know some user some day will surely filter for STORE1|STORE2 and then you got an angry phone call
If it is a report, I would create a field on the req. form with a variable and filter by hand in OnPreDataitem instead of having the user use the standard filters.
Do It Yourself is they key. Standard code might work - your code surely works.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