Set focus on a specified field by currform.control.activate
willy
Member Posts: 67
Hi!
Anonye tried to make a list form with the oppurtunity to search for a specified field and set focus on that field by code?
I need to avoid scrolling to much and wonder if there is a way to use the
currform.control.activate and put in the name of control I want by code.
(something like currform.MyValue.activate, where MyValue is the field I have entered in my search field).
I can get the field name and caption by searching through the Field table but haven't found a way to solve this problem.
Any ideas?
Anonye tried to make a list form with the oppurtunity to search for a specified field and set focus on that field by code?
I need to avoid scrolling to much and wonder if there is a way to use the
currform.control.activate and put in the name of control I want by code.
(something like currform.MyValue.activate, where MyValue is the field I have entered in my search field).
I can get the field name and caption by searching through the Field table but haven't found a way to solve this problem.
Any ideas?
0
Comments
-
-
Hi! Maybe I did not explain what I wanted to do good enough.
I want to search amoung the Colums in a list.
For example in the Customer list (Form 22), I enter "Blocked" in my search field and I want the system to move the focus to that Column.0 -
On the SubForm Set DelayedInsert to Yes, give a name for you column (MyColumn) and inserto into OnNewRecord trigger this code:
IF CurrForm.ACTIVE THEN
CurrForm.MyColumn.ACTIVATE;
Bye
Eclipses0 -
A "variable" CurrForm.MySpecificSearchFieldValue.activate is not possible, but you can use the following:
MySpecificSearchFieldValue = Option (to avoid typing errors) -> Value are the coloumns that u will use (for example ,No.,Name,Phone No.)
New TextBox with the MySpecificSearchFieldValue as seourceexpr.
Then in the OnAfterValidate of the textBox you write the following<Control1119402000> - OnAfterValidate() case MySpecificSearchFieldValue of MySpecificSearchFieldValue::"": CurrForm.ACTIVATE; MySpecificSearchFieldValue::"No.": CurrForm."No.".ACTIVATE; MySpecificSearchFieldValue::"Name": CurrForm.Name.ACTIVATE; MySpecificSearchFieldValue::"Phone No.": CurrForm."Phone No.".ACTIVATE; end;
Do you need this for setting a filter in this coloumn by using a other textbox where the user enter you filtercriteria?
RegardsDo you make it right, it works too!0 -
Edit: Deleted my post, sorry didn't read carefully
K.S.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
- 333 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
