Options

OnInputChange-Trigger

MFKMFK Member Posts: 17
edited 2000-11-01 in Navision Financials
hi there!

I want to trace a input in a textbox (with an global as source-expression).

Everytime the input is changed the OnInputTrigger is called - but how can I fetch the value of the field?

I want to enter a number (say itemno.) and if I enter a * the code in the OnInputchange should catch that and call a function.

Possible???

TIA,
Martin

Comments

  • Options
    anolisanolis Member Posts: 16
    The following example should be placed in the 'OnValidate trigger'.
    It only works when you validate de textbox after you entered the '*'.

    vars:
    t:int
    ch:text
    itemnr:text

    t:=STRLEN(itemnr);
    IF t>0 THEN BEGIN
    ch:=COPYSTR(itemnr,t,1);
    IF ch='*' THEN MESSAGE('ok');
    END;

    I hope this will get you in the right direction.


  • Options
    MFKMFK Member Posts: 17
    thanks, but tjis is not that what I really need. Maybe my description was not exact enough.

    I want to do something - that is called "incremental search". After each keystroke (without validating it with ENTER) should the search be performed. You can see that in Navision in the Find-Dialog with "Find as you type" enabled.
  • Options
    anolisanolis Member Posts: 16
    I understand, and understood. What happens in the Find-Dialog, can not be programmed in C/SIDE or C/AL.
    What I mean is that what you want to do, is not posible in Navision.

    ...what you can do, is build a form in VB or C++ and implement the incremental search using C/FRONT. The form should be in a ActiveX control that can be called by Navision. This will work, as long as you make your form modal, but depending on the data you want to search, it will be relatively slow.


Sign In or Register to comment.