Field Filter for option variable
elysaval
Member Posts: 24
Hi, I have a variable of type Option (Example DocType = Quote,Order,Invoice), i set this variable as the Source Expr of a control in a form = ctrlDocType. In ctrlDocType I set the Option String (the same of the variable). Now I'd like to use this control to input a filter like : Order|Quote, but the error is 'Order|Quote' is not an option. How to filter an option control in this way ? for example using Navision Standard Field Filter on an option field it allows you to input a filter using | or &....
I tried ti use a Text variable and leaving the option string only in the ctrlDocType, but in this way i haven't the dropdown button nor a message of error if the option doesn't exist.
Can you hel me ? Thanks. Elisa.
I tried ti use a Text variable and leaving the option string only in the ctrlDocType, but in this way i haven't the dropdown button nor a message of error if the option doesn't exist.
Can you hel me ? Thanks. Elisa.
0
Comments
-
Is this what you want (I didn't understand exactly what you mean):
SETFILTER(DocType,'%1|%2',DocType::Quote,DocType::Order);
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
[-X No, it's not this, too simple !
I give you an example : you are in Object Designer, you are positioned in Type column (wich is an option field), you push the navision field filter and digit 'Table|Report', and OK.
I want my textbox behave like navision field filter, i mean i want to digit in my textbox Option1|Option2 and not having the error 'Option1|Option2 is not an option'.
More clear now ? THANKS. Elisa.0 -
Replace the option control with a text control. Text variable should be length 80 or greater. Add the following code in the OnAfterValidate of the text control:
SETFILTER("Document Type", TextVar)0 -
and you can add this line
TextVar := GETFILTER("Document Type");To "translate" user entered short form of filter like '1|2' or 'I|O' to 'Quote|Invoice'.0 -
In this way i haven't drop down button ! And I haven't the error for wrong choises.
Thanks anyway, i think the only way is to define a flowfilter in the table.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 327 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
