Textbox deletes trailing space characters

mabl4367mabl4367 Member Posts: 143
Hi all!

I have a textbox on a form. The sourcexpression is a variable of data type Text.

When entering something into the textbox it seams as though navision trims any trailing space characters from the end of the imput text.

Does anyone know a way around this?

Answers

  • mabl4367mabl4367 Member Posts: 143
    No one?

    Have any one noticed that the space characters are deleted? Is it the same in all versions of NAV?

    I'm on 3.70 by the way.
  • reijermolenaarreijermolenaar Member Posts: 256
    Hi mabl4367,

    What you can do is write code in the OnAfterInput trigger of the textbox to catch the spaces.
    Reijer Molenaar
    Object Manager
  • mabl4367mabl4367 Member Posts: 143
    I tried to do what you suggested reijermolenaar but it doesn't work for me. I put
    MESSAGE(txtSourceExpr + 'Hello'); in the OnAfterInput trigger but in that trigger no input has yet been stored.

    If I put the same line of code in the OnValidate trigger it works as long as the last character is not a space.

    The input it not written back to the source expression until the textbox loses focus and then any trailing space characters are removed.

    Any other ideas?
  • reijermolenaarreijermolenaar Member Posts: 256
    YourField - OnAfterInput(VAR Text : Text[1024];)
    MESSAGE(Text + 'Hello');
    
    Reijer Molenaar
    Object Manager
  • mabl4367mabl4367 Member Posts: 143
    Works great!

    Thanks!

    Why didn't I think of the triggers input param? :oops:
  • krikikriki Member, Moderator Posts: 9,110
    [Topic moved from 'Navision Financials' forum to 'NAV/Navision Classic Client' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.