Keyboard count

kenjeskenjes Member Posts: 76
Hi

Is it possible to count keystroke in at field, and when count = 3 then insert a "-" ??

(SalesOrder line, Purch Line etc.)

THANKS

/Kenneth

Comments

  • BeliasBelias Member Posts: 2,998
    edited 2015-11-09
    Maybe it's possible with a client control addin which overrides the standard textbox.
    Or you can simply add a '-' in the 4th character of the string during the onvalidate trigger. In this way, your '-' will be inserted even if you fill the field from code.
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • EvREvR Member Posts: 178
    If you want the dash inserted while typing, a control addin is your only option.
    That way you can even just make the dash visual without having it in the actual data.
    (make it a javascript addin if you want it to work in the web client)
  • kenjeskenjes Member Posts: 76
    Thanks
    Do you know examples on key stroke detecting code :)

  • EvREvR Member Posts: 178
    I would suggest a jquery plugin like the one @ http://digitalbush.com/projects/masked-input-plugin/
  • kenjeskenjes Member Posts: 76
    Something in .NET

    Or, some guide to make Control Addin in Java :):)

    Thanks
  • Wisa123Wisa123 Member Posts: 308
    You actually want a proper add-in (Those things you import into the Add-In Table) - and javascript/jquery is the way to go there.

    All .NET dll's you include into NAV will only work in the windows-client.
    Austrian NAV/BC Dev
  • kenjeskenjes Member Posts: 76
    :) I understand

    Do you know some guide for making JavaScript/jquery Add-in to NAV...
  • EvREvR Member Posts: 178
    Wisa123 wrote: »
    You actually want a proper add-in (Those things you import into the Add-In Table) - and javascript/jquery is the way to go there.

    All .NET dll's you include into NAV will only work in the windows-client.

    That's a bit misleading. Javascript addins are .NET libraries as well.
    The distinction is, 'Winform' .NET addins will only work in the Windows client. Javascript .NET addins will also work in the web client.
  • EvREvR Member Posts: 178
    kenjes wrote: »
    :) I understand

    Do you know some guide for making JavaScript/jquery Add-in to NAV...

    https://msdn.microsoft.com/en-us/library/dn182584(v=nav.90).aspx
  • kenjeskenjes Member Posts: 76
    I have mannaged to put masked input control add in on a field in a card page.
    But, what about a listpage... the field disappears

    What to do ? :smiley:
    Thanks

    (For now I do It with C# class, but I am looking at the jquery :smile: )
Sign In or Register to comment.