How to split a text field in NAV?

chandrurecchandrurec Member Posts: 560
Hi all,

I am having a text field as follows.

1) INSTALL TANKS AND FENDER, REAR TYRE FLAT - CHECK. 2) INSTALL ENGINE GUARD, NOTE: REAR TURN SIGNAL - NEEDS BADLAMBS, REAR AXLE COVER (OWN)


When displaying I need to display as
1) INSTALL TANKS AND FENDER, REAR TYRE FLAT - CHECK.
2) INSTALL ENGINE GUARD, NOTE: REAR TURN SIGNAL - NEEDS BADLAMBS, REAR AXLE COVER (OWN)

I tried to use Multiline property for textbox in form but it does not work.

IS there any other way by which I can display the text as above.

Thanks in advance.

Regards,
chandru.

Comments

  • kinekine Member Posts: 12,562
    Why it is not stored as two separate entries in table? NAV is not text editor and this is not the way to use it. Try to rethink it in "NAV way"...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • geordiegeordie Member Posts: 655
    As kine said, the most efficient is storing them in two different entries.
    If it isn't possibile, you should write some code to detect the "x)" parts of the string ("2)", "3)", "4)", etc...) and insert a "\" character if you use classic client or CR and LF chars if you use RDLC reports.
  • chandrurecchandrurec Member Posts: 560
    Hi geordie,

    Actually the data the client is giving is from some other software they are already using. Thats why I cannot force them to give in NAV way. But I found that the data is also not constant format. It changes from line to line.In Some line the field is displayed as follows

    1. 16,000 Km SERVICE.
    2. CHECK SPEEDO AND TACHO.
    3. THROTTLE CABLES TIGHT. NEEDS OILING.
    4. REPLACE HORN. WARRANTY.
    5. RED ENGINE LIGHT COMES ON AFTER STARTING."

    and in some lines the field is displayed as follows.

    1) PRIMARY GASKET LEAKING. 2) RETUNED IGNITION TIMING.

    In this case, how to display it in the fashion as I have mentioned in previous post.

    Regards,
    chandru.
  • kinekine Member Posts: 12,562
    Than you need to detect what is different (it could be because there is CRLF once, and CR only or LF only in second). But generally, this is something you need to solve systematically. I do not know the source system, but in many cases there is someone responsible for the export who can change the export. If it is "fixed" system, where nobody could change that, you need to create some system between the source and NAV which will transform the data as needed (detect the end of line, separate the lines into separate records etc.).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.