Copy-paste entire cel from excel to Navision field

gjvk70gjvk70 Member Posts: 60
edited 2009-07-01 in Navision Financials
We have some problems with copy-paste actions from excel to Navision. When I select a cel in excel and copy it (the cel, not the selected contents) to a field in Navision the cel contents will be pasted, but also two "line feeds".
This is not a big deal, I can see the line feeds as two squares and delete them. However we have a new workstation on which the squares are not visible and the user often forgets to delete the line-feeds...

Does anyone know what could cause the linefeeds to be invisible? I think it has something to do with the code pages.

Any help greatly appreciated.

Kind regards,
Gerard
Gerard van Kuijl - United - http://www.united4all.nl

Comments

  • kinekine Member Posts: 12,562
    You can try to delete the two characters in OnValidate trigger or in another trigger directly on the form where you are pasting the data.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,112
    kine wrote:
    You can try to delete the two characters in OnValidate trigger or in another trigger directly on the form where you are pasting the data.
    Something like:
    TheField := DELCHR(TheField,'<>');
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • KaetchenKaetchen Member Posts: 106
    I have exactly the same problem. Did you ever find a solution to setup the workstation, so it would display the "squares"?[

    Thanks,
    Kaetchen
  • krikikriki Member, Moderator Posts: 9,112
    Kaetchen wrote:
    I have exactly the same problem. Did you ever find a solution to setup the workstation, so it would display the "squares"?[

    Thanks,
    Kaetchen
    Did you try the trick in my previous post?
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • KaetchenKaetchen Member Posts: 106
    Did you try the trick in my previous post?

    No, because this is a general problem in every form.
    I think it will relate to the Windows settings - maybe "fonts".

    I have not much experience with C/AL Programming and although I change sometimes reports, forms and dataports I'm reluctant to make unnecessary changes in the standard objects.
  • Torben_R.Torben_R. Member Posts: 99
    Every time you put a value into a field codeunit 1 is triggered.

    Here you will find the different subfuntions Make?????. The parameter is always a text.

    Add a subfunction ie. Clear_CR_LF
    Parameters:
    Var     Text          Text           1024
            MaxLenght     Integer
    
    Local variables
    Char1       Char		
    P           Integer		
    TextLength  Integer		
    TempText    Text                      250
    
    TempText := '';
    TextLength := STRLEN(Text);
    FOR P := 1 TO TextLength DO BEGIN
      Char1 := Text[P];
      IF NOT (Char1 IN [1..31]) THEN
        TempText := TempText + FORMAT(Char1);
    END;
    IF STRLEN(TempText) > MaxLength THEN
      Text := COPYSTR(TempText,1,MaxLength);
    Text := DELCHR(TempText,'<>');
    
  • Flo31Flo31 Member Posts: 4
    Hi,

    Topic very interessant, but is it possible to make the same thing for code fields ?
    There is no MakeCode in codeunit 1...

    Thanks !
Sign In or Register to comment.