Error 'a value in the filter ... is too long'

gazpacho
Member Posts: 48
Hello
I use a function to dynamically fill a code variable (length 250) with certain salesperson codes (for example, it returns the variable LocCodFiltervalue with value '100|150|180|200|210'). Then, I want to use this value as a filter on the salesperson code field in the interaction log entry table. But when I use SETFILTER("Salesperson Code",'%1',LocCodFiltervalue), it returns the error message
'a value in the filter "100150|180|200|210" in the salesperson code field in the interaction log entry table is too long for the field type." Type Code 10.
What am I doing wrong here ? Or is there a better way ?
Best regards
Josh
I use a function to dynamically fill a code variable (length 250) with certain salesperson codes (for example, it returns the variable LocCodFiltervalue with value '100|150|180|200|210'). Then, I want to use this value as a filter on the salesperson code field in the interaction log entry table. But when I use SETFILTER("Salesperson Code",'%1',LocCodFiltervalue), it returns the error message
'a value in the filter "100150|180|200|210" in the salesperson code field in the interaction log entry table is too long for the field type." Type Code 10.
What am I doing wrong here ? Or is there a better way ?
Best regards
Josh
0
Answers
-
Solved: removed the '%1' did the trick. Don't know why, but it works now !0
-
Hej Gazpacho,
As far as I know, it's quite simple:
- using SETFILTER(field,'%1',Text)
nav expects Text to align to field in type/length.
That is Text is supposed to hold a value valid for field.
- using SETFILTER(field,FilterText)
nav accepts that FilterText holds a filter .
That is FilterText is supposed to hold a filter valid for field.With Kind Regards
Thoms Hviid Thorn0
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