Remove line breaks in VI Export

SOLVED

Hello all,

SAGE 100 Could Advanced 2020 (V6.20.1.0)

I have a VI (Visual  Integrator) export job that pulls fields from CI_Items out of SAGE and into a .CSV file. I use Task Manager to automate this export and then another software reads the .CSV files. It is great and I don't have to do anything for the data to be updated.

I do have a problem. though. When I export the "CI_ExtendedDescription" - ExtendedDescriptionText field some of the data has returns in it and these are handled as cell breaks in the resulting .CSV file. It is about 6,000 lines and may users enter data so I would rather do the clean up on the export than try to make sure all users enter data without carriage returns.

I have read about making the Operation Calculated in the Export Field Properties and using some of the Functions and Operators to write function (right term???) to remove the carriage breaks and line breaks. It does seem to be working for me. I have read up on ProvideX to try and see if I can figure out what I am doing wrong but I have not had any luck as of yet. When I use the formula below all it does is make the cells in the column (other than the header) blank. But every other field exports fine.

Any ideas? 

SUB(CI_ExtendedDescription.ExtendedDescriptionText$, $0D0A$, "TEST")

Thanks in advance!

Parents Reply Children
  • +1 in reply to David Speck
    verified answer

    Also, did you type in the field name or select it from the list?

    Just pulled up one of my old jobs i used for testing and noticed the table name should have a two digit number suffix before the period and field name.  Also, I see that in this test job, I did not have to use a temp field but the actual field with the Calculation operation worked.  In this example, I was only replacing the line feeds with a blank string but you can nest it to also remove the carriage returns.

  • 0 in reply to David Speck

    That was it! Just that one comma left out on the expression. I did change to the actual field vs. the temp one and I changed from Align to Calculated. Worked and the CSV came out perfect! Thank you again!!! You are my SAGE hero! LOL

    And the row in CSV: