OnInputChange

jesamjesam Member Posts: 100
edited 2008-05-23 in Navision Attain
Somebody posted this question back in 2002 but there were no answers so I am going to try again because now I have the same problem.

The Help files say :

OnInputChange
The C/AL code in this trigger is executed while the user makes entries into a text box. You can use this trigger to check the entries the user is making as he or she enters information.

The problem is that they do not say (what a surprise) how to get a hold of what the user enterred IN THIS TRIGGER.
I know it is possible to use the OnAfterInput trigger, but that is oky executed AFTER the textbox has lost its focus, so that is no good.
Does anybody have a solution for this problem ?

Comments

  • VanDoghVanDogh Member Posts: 8
    I have similiar problem..
    I'm trying to stop allow writing, if next character doesn't mark to my set ('0'..'9')
  • jesamjesam Member Posts: 100
    I still haven't found an answer to that problem, so we'll just have to hope somebody else chimes in ...
  • VanDoghVanDogh Member Posts: 8
    I've found 2 ways, but that not what I want..

    1. Put CurrForm.UPDATE to OnInputChange.. But then You can't get the last character.
    2. Try to manipulate Text in trigger OnFormat, there is almost what I want, becouse also have to put CurrForm.UPDATE to OnInputChange, and then the value is selected.. UPDATESELECTED(FALSE) in OnFormat do nothing.. :(
  • ReinderReinder Member Posts: 13
    One solution that works for me:
    - Set property AutoEnter to Yes
    - Use Variable Code/Text with length 1
    - Use OnAfterInput instead of OnInputChange
    - Handle character there
    Reinder van der Veen

    Reinder ICT Nijmegen
    Wolfskuilseweg 96 - 6542 JM NIJMEGEN - The Netherlands
    Tel.: +31 (0) 24 373 81 38 - Mob.: +31 (0) 6 20 650 311
    E-mail: reindervdv@gmail.com
Sign In or Register to comment.