Keyboard catch event
grilli
Member Posts: 33
Hello my friends;
I have a problem, I want to catch events from keyboard. It means, I have a form with a textbox and a subform, when the user type a word in this textbox I want to apply a filter to the subform. My problem is that the validate trigger of the textbox is only executed when I press Intro, and I want to filter every time the user introduce a char in the textbox.
Can anybody help me?
Thank you. ](*,) ](*,)
Bye.
I have a problem, I want to catch events from keyboard. It means, I have a form with a textbox and a subform, when the user type a word in this textbox I want to apply a filter to the subform. My problem is that the validate trigger of the textbox is only executed when I press Intro, and I want to filter every time the user introduce a char in the textbox.
Can anybody help me?
Thank you. ](*,) ](*,)
Bye.
0
Comments
-
Tried the OnInputChange() trigger?0
-
I´ve tried this but it doesn´t work. The problem is that I want to filter with the value of the textbox and in this event the textbox doesn´t have value.
Thank you.0 -
Interested pot, I have the same problem, I´m trying to do the same funcionality of Navison Find button (Ctrl. F).0
-
If this action is that I'm trying to replicate but in a textbox and that also goes for typing
Can someone help? It is very important0 -
Doesn't NAV 2009 SP1 have the FAYT Find as you type functionality ?
You can look there perhaps for examples, though it might only be RTC relevant0 -
If I undertand you, this funcionality only works in the RTC. I need it in classic client.0
-
The version on which I am trying to replicate a 2009 SP1 but the classic client and a textbox on a form.0
-
1) These types of "hacks" are too costly for effect which they have for customer (he could use standard functionality for the same result)
2) Question is - what you want to solve by this? Is data entering too slow for customer? Is it just wrong training?
There is no standard way for this in NAV. And there is a reason for that. Even the "find as you type" could kill your server... why to add another way how to kill the performance?0 -
Before continuing with this I need to ask:
If your user enters a 10-char text then you will apply a filter 10 times, after each keystroke?
This could cause problems with your system performance.0 -
Yes that's what I need. For every keystroke I need to change the filter in terms of what made so far. I know it's going slow but I need a way to do it anyway.
Thanks,0 -
I have never done something similar before. In fact I always encourage my customers to uncheck the "Find as you type" option to gain performance.
But if you really need this you van do the following as a start.
Create a Text variable for your filter.
Create a second Text variable of length 1.
Assign the second text variable to a text box and set the Auto enter property to true. In that text box, every time you press a character the onafterinput trigger will be executed. Then play around with the available properties and code in order to add the entered value to your normal text variable.
This could be a start point to get you where you want...0 -
We already had tried but has a problem and I in this field with characters entering and AutoEnter voi voi ai composing the other varibles and filtering but now also needs to control when given a Enter to send a message to launch an action. Does anyone know how I can improve this or otherwise?
Thanks,0 -
Someone knows how to solve the problem of slow down the process even if I do not care.
Please help me0 -
Sometimes you have to accept that not everything can be done in NAV.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
Everything you can imagine is possible in NAV.
I will not sleep until I get it and when this moment becomes you will remember me.
New suggestions please0 -
In your dreamsgrilli wrote:Everything you can imagine is possible in NAV.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
If you don't mind I won't hold my breath

You're wrong by the way, there's plenty of things that are not possible in NAV.0 -
Linnet! "In what world do you live? In Navision everything can be developed. And believe me but I'm going to show and I'll find solution to the problem above. if you dare try to put the solution before me.0
-
Yes, everything is possible, but only with unlimited budget...grilli wrote:Linnet! "In what world do you live? In Navision everything can be developed. And believe me but I'm going to show and I'll find solution to the problem above. if you dare try to put the solution before me.
and this is the main problem... 8) 0 -
I can route a little so my budget is not an unlimited too? You know some pause to continue because I have any idea but just not be 100% correct.


Thanks0 -
No. It really cannot.grilli wrote:In Navision everything can be developed0 -
Hello,
I think the "OnInputChange() trigger" solution works but you need to use CurrForm.SAVERECORD in first to get value of your Textbox.
Regards
Edit : just tried, works but with 1 problem : you need to catch and works on the value in textbox because with Saverecord, each time use type on keeboard the previous carracter is replaced by the new one :P
But seems easy to manage that.
Edit 2 : In fact, not easy at all to manage... dont waste your time with my solution, it doesnt work
0 -
Hi,
may you can try this.
(...inspired by the tool "pocket calculator")
The "#"-key will clear the filter.OBJECT Form 50010 Instant Filter Input { OBJECT-PROPERTIES { Date=10.11.09; Time=18:17:08; Modified=Yes; Version List=; } PROPERTIES { Width=9790; Height=6820; InsertAllowed=No; DeleteAllowed=No; ModifyAllowed=No; TableBoxID=1000000000; SourceTable=Table18; } CONTROLS { { 1000000000;TableBox;220 ;1100 ;9350 ;5500 ;HorzGlue=Both; VertGlue=Both; Focusable=No } { 1000000001;TextBox;0 ;0 ;1693 ;0 ;ParentControl=1000000000; InColumn=Yes; SourceExpr="No." } { 1000000002;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000001; InColumnHeading=Yes } { 1000000003;TextBox;0 ;0 ;4400 ;0 ;HorzGlue=Both; ParentControl=1000000000; InColumn=Yes; SourceExpr=Name } { 1000000004;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000003; InColumnHeading=Yes } { 1000000008;TextBox;1540 ;330 ;880 ;550 ;Visible=Yes; ForeColor=12632256; MaxLength=1; AutoEnter=Yes; NextControl=21; SourceExpr=KeyStroke; OnBeforeInput=BEGIN IF KeyStroke = '#' THEN BEGIN CLEAR(FilterString); CLEAR(KeyStroke); END; CurrForm.Trigger.ACTIVATE; FilterString += FORMAT(KeyStroke); CLEAR(KeyStroke); SETFILTER(Name,'%1','@'+FilterString+'*'); CurrForm.UPDATE; END; } { 1000000009;CommandButton;220;330;1210;550 ;Name=Trigger; Focusable=No } { 1000000010;TextBox;2640 ;330 ;6490 ;550 ;Focusable=No; SourceExpr=FilterString } } CODE { VAR FilterString@1000000000 : Text[1024]; KeyStroke@1000000002 : Char; BEGIN END. } }
best regards
sd0 -
This solution you posed, and I tried but has a major drawback. It also allows you to capture the ENTER key and delete, before which I want to blow up a certain process.
Thanks,0 -
It is possible to catch "Shift + Enter" and "Shift + Delete", but not the other special keys. Strange.
btw, does anybody here maybe know what the keys "left", "right" and "middle" are for? (mouse?)OBJECT Form 50010 Instant Filter Input { OBJECT-PROPERTIES { Date=11.11.09; Time=14:15:22; Modified=Yes; Version List=; } PROPERTIES { Width=9900; Height=7700; InsertAllowed=No; DeleteAllowed=No; ModifyAllowed=No; SourceTable=Table27; } CONTROLS { { 1000000008;TextBox;1540 ;330 ;880 ;550 ;Visible=Yes; ForeColor=12632256; MaxLength=1; AutoEnter=Yes; NextControl=21; SourceExpr=KeyStroke; OnBeforeInput=VAR HlpInt@1000000001 : Integer; BEGIN HlpInt := KeyStroke; IF HlpInt = 0 THEN BEGIN CurrForm.SpecialKeys.ACTIVATE; EXIT; END; IF KeyStroke = '#' THEN BEGIN CLEAR(FilterString); CLEAR(KeyStroke); END; CurrForm.Trigger.ACTIVATE; FilterString += FORMAT(KeyStroke); CLEAR(KeyStroke); SETFILTER(Description,'%1','@'+FilterString+'*'); CurrForm.UPDATE; END; } { 1000000009;CommandButton;220;330;1210;550 ;Name=Trigger; Focusable=No } { 1000000010;TextBox;2640 ;330 ;6490 ;550 ;Focusable=No; SourceExpr=FilterString } { 1000000005;TableBox;220 ;1100 ;9350 ;5610 ;HorzGlue=Both; VertGlue=Both; Focusable=No } { 1000000007;TextBox;0 ;3850 ;1700 ;440 ;ParentControl=1000000005; InColumn=Yes; SourceExpr="No." } { 1000000011;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000007; InColumnHeading=Yes } { 1000000012;TextBox;1700 ;3850 ;4400 ;440 ;ParentControl=1000000005; InColumn=Yes; SourceExpr=Description } { 1000000013;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000012; InColumnHeading=Yes } { 1000000000;MenuButton;220;6930;3300 ;550 ;Name=SpecialKeys; VertGlue=Bottom; Focusable=No; Menu=MENUITEMS { { ID=1000000001; ShortCutKey=Return; CaptionML=DEU=Enter; OnPush=BEGIN MESSAGE('enter'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000022; ShortCutKey=Shift+Return; CaptionML=DEU=Shift Enter; OnPush=BEGIN MESSAGE('shift enter'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000002; ShortCutKey=F5; CaptionML=DEU=f5; OnPush=BEGIN MESSAGE('f5'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000015; ShortCutKey=F7; CaptionML=DEU=f7; OnPush=BEGIN MESSAGE('f7'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000003; ShortCutKey=Tab; CaptionML=DEU=tab; OnPush=BEGIN MESSAGE('tab'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000004; ShortCutKey=Home; CaptionML=DEU=Home; OnPush=BEGIN MESSAGE('Home'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000006; ShortCutKey=Insert; CaptionML=DEU=Insert; OnPush=BEGIN MESSAGE('insert'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000023; ShortCutKey=Shift+Return; CaptionML=DEU=Shift Insert; OnPush=BEGIN MESSAGE('shift + insert'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000014; ShortCutKey=End; CaptionML=DEU=End; OnPush=BEGIN MESSAGE('end'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000016; ShortCutKey=Delete; CaptionML=DEU=Delete; OnPush=BEGIN MESSAGE('Delete'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000024; ShortCutKey=Shift+Delete; CaptionML=DEU=Shift Delete; OnPush=BEGIN MESSAGE('Shift Delete'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000017; ShortCutKey=BackSpace; CaptionML=DEU=Back; OnPush=BEGIN MESSAGE('back'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000018; ShortCutKey=Esc; CaptionML=DEU=ESC; OnPush=BEGIN MESSAGE('esc'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000019; ShortCutKey=Left; CaptionML=DEU=left; OnPush=BEGIN MESSAGE('l'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000020; ShortCutKey=Center; CaptionML=DEU=middle; OnPush=BEGIN MESSAGE('m'); CurrForm.Trigger.ACTIVATE; END; } { ID=1000000021; ShortCutKey=Right; CaptionML=DEU=right; OnPush=BEGIN MESSAGE('r'); CurrForm.Trigger.ACTIVATE; END; } } } } CODE { VAR FilterString@1000000000 : Text[1024]; KeyStroke@1000000002 : Char; BEGIN END. } }0 -
The previous object gives an error because of an import function that returns value. Anyway, I need to detect the above keys without pressing another simultaneously.
Thank you,0 -
There is a Hotkey Extender available (http://www.mibuso.com/dlinfo.asp?FileID=1120). With this automation you can catch all keyboard events (almost) immediately. This depends on the TimerInterval property of your form.
I hope it helps. It solved my problem. I had the problem that code had to executed when the Left- or Right-arrow key were pressed.0 -
The automation also I catch the enter raisins I do? Is there another way to use it without a timer? Anyone know of any automation that help it capture keys? Because I have seen other sounds more effective.
Thank you,0 -
Hi experts
I am also Trying to this but at last no fillter works as on RTC client.I think for this functionality our classic client should be support by .Net plateform then we go further on it. If I worng please tell me and welcome your suggestion regarding this issue.Devendra Kr. Sharma
IBIZ Consulting Services,India0
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
- 323 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


