2026-11-27

Sage 100: Include a Carriage Return in a Visual Integrator Job

Line breaks in your source data get stripped by Visual Integrator imports. Here is the confirmed VI calculation — CHR(13) + CHR(10) — that puts a real carriage return into comment and description fields, and the Premium caveats.

Your source data has two lines of text with a proper break between them — in SQL Server it is built as "Line one text" + CHAR(13) + CHAR(10) + "Line two text" — and after the Visual Integrator import, the field in Sage 100 holds one run-on line. The break was stripped somewhere between the source and the target field. Embedding the break harder in the source is not the answer: the approach confirmed in the Community Hub thread produces the break inside the VI job, as a calculation, where VI evaluates it instead of transporting it.

One scope note before the steps: a line break only survives in a field that legitimately holds multi-line text — a comment field, a description or extended description, or a multi-line UDF. The confirmed case below is the Sales Order line comment field. Do not try to put breaks into ordinary code, number, or single-line fields; there is nowhere for the break to live.

The fix

Confirmed on Sage 100 Advanced 2016, importing into Sales Order lines:

  1. Open the VI import job and go to the field mapping for the target multi-line field (in the confirmed case, the Sales Order detail comment field).
  2. Change that field's operation from a direct source assignment to a calculation (Calculated).
  3. Build the calculated value as a string expression that joins your text with the break expressed as ProvideX character functions, in this order: text + CHR(13) + CHR(10) + text. CHR(13) is the carriage return, CHR(10) is the line feed, and Windows multi-line text uses them in that order — return first, then feed. The reporter who confirmed this fix describes it exactly that way: using chr(13) + chr(10) in the job produced a real line break in the comment field.
  4. If your source data marks break positions with a placeholder instead of real breaks (the original poster's plan: put a token in the source, swap it during the import), do the swap in this same calculated field — the calculation assembles the final value, replacing the placeholder with CHR(13) + CHR(10) as it builds the string. VI calculations are ProvideX expressions, so the string functions documented for ProvideX are the ones available to you here.
  5. On Premium, also enable "Skip Source Data Truncation" on the job before testing. A contributor demonstrated the Premium v2017 import (with ABX data) with that setting on; treat it as part of the Premium recipe, not an optional extra.
  6. Run the job against a small test batch first. Then open the imported record and look at the field: you should see two lines, not one line with a gap or a stray character. If you need certainty about what was stored, check the record in Data File Display and Maintenance (DFDM) — but read the next section before interpreting what DFDM shows you.

Options and approaches

Produce the break in the calculation (recommended, confirmed)

The method above. It works because VI evaluates the ProvideX expression as it writes the field, so the CR and LF characters are generated at write time. Nothing in the source transport — ODBC reads, file parsing, field truncation rules — gets a chance to strip them, because they do not exist until the value is built.

Carry the break in the source data (works in some routes, failed in the reported one)

The original poster had previously imported from MS Access with the break built by Access's Chr() functions, and that route preserved it. The same poster's SQL Server route — CHAR(13) + CHAR(10) concatenated in the SQL field, imported directly — had the breaks stripped. The lesson is narrow but important: a source-side break is at the mercy of the source type and its ODBC path. If your source-side import is losing breaks, do not debug the source character by character — move the break into the VI calculation, where the confirmed fix lives.

Check the characters around the expression (unconfirmed)

Unconfirmed check: if your calculation looks right and produces nothing, inspect the characters immediately around the CHR expressions in the source data before redesigning the job. No confirmed instance of an escaping-character cause was established in the source thread for this page, so treat this only as a place to look, not as a documented fix.

What doesn't work

  • The legacy ~;~ token. Older MAS versions reportedly treated the sequence ~;~ in imported text as a carriage return for descriptions. A user on 4.5 tried it for this exact purpose and reported it imported literally — the field showed "~;~" and no break. Do not build a new job on it.
  • Importing the character DFDM seems to show. Looking at existing multi-line data in DFDM on 4.5, the break displays as a glyph resembling "DF" (char 223). Importing that character did not produce a break. The DFDM glyph is a display substitute for a non-printing character, not the stored value — a later VI thread makes the same point about DFDM's rendering of control characters.
  • Reversed order, CHR(10) + CHR(13). A line feed followed by a carriage return is not the Windows line ending. The thread flags the poster's own two descriptions (13+10 in one post, 10+13 in the next) as a possible simple cause. If your expression "almost works," check the order first.
  • Direct assignment of a SQL CHAR() break. As reported above: built correctly in SQL Server, stripped on import. This is the failure the page exists to solve.

Per-context variants

Premium v2017: demonstrated in the thread by screenshot — a VI import producing the break, run with Skip Source Data Truncation enabled. If you are on Premium and the Advanced recipe alone does not hold the break, that setting is the documented difference to test.

Premium 2019 — reported broken, honestly unresolved: the same contributor who confirmed the fix on Advanced 2016 reported, after moving to Sage 100 Premium 2019, that the CHR(13) + CHR(10) approach "no longer works." No confirmed 2019-specific resolution appears in the thread. On 2019: test the calculation with Skip Source Data Truncation enabled, inspect the characters around the CHR expression (unconfirmed check, above), and verify what was actually stored via the imported record rather than the import log. If none of that holds the break, you have reached the edge of what is documented — capture the job definition and a sample source record and escalate it as a version-specific case rather than stacking more workarounds on the job.

Extended descriptions and UDFs: the same calculation approach applies to other multi-line targets (the thread's other attempts aimed at CI Item extended descriptions and a UDF on invoice records). The field must be one that stores multi-line text in Sage 100; the mechanism does not change, only the target field on the mapping.

The reverse job (removing breaks on export): not covered by the source thread for this page. Removing CR/LF characters on export would use the same Calculated-field machinery in reverse, but that specific export recipe is unconfirmed here — test it on a copy job before relying on it.

Affected versions

  • Confirmed: Sage 100 Advanced 2016 (VI import, SO line comment field).
  • Demonstrated: Sage 100 Premium v2017, with Skip Source Data Truncation enabled.
  • Reported not working, no confirmed resolution in the thread: Sage 100 Premium 2019.
  • Dead ends documented on: MAS 90/100 4.5-era installs (the ~;~ token and the DFDM-glyph character).
  • The original question (SQL Server source, UDF target) never received a poster confirmation — the confirmed case is the comment-field calculation above, which is the method to apply to that scenario.

Prevention / best practice

  • Standardise on producing breaks in VI calculations, not in source data. One technique that survives source-system changes beats a per-source trick that breaks when you move from Access to SQL Server.
  • Keep a one-record test file for every multi-line import job and re-run it after every Sage 100 upgrade or edition move (Standard/Advanced to Premium especially). This exact technique changed behaviour across that move once already.
  • Document the expression in the job's notes, including the CHR order (13 then 10) and any job-level settings the result depends on, such as Skip Source Data Truncation. The next maintainer should not have to rediscover either.
  • Verify results in the actual record, not the VI log: a job can complete with no rejections while quietly writing one-line fields.

Related help

Still stuck? Send us a screenshot of the error, we will diagnose it for free.

Digit Masters has supported Sage 100 and Sage 300 since 1997. Send the screenshot through our contact page or to contact@digitmasters.com, or call (800) 965-4262.

Ready to Optimize Your Sage ERP?

Speak with a CPA-led Sage consultant. Free initial consultation — English or Chinese.

Get a Free Consultation