Exporting Tab Delimited Data in Pan 6 vs. Pan X – Strip( Function

A simple procedure that I have used for decades perhaps that worked in Pan 6 does not work in Pan X.

The issue revolves around Strip ( function.

In this large database of over 16,000 records occasionally I get some data that is invisible and does not get filtered out in Pan X vs. Pan 6. I end up with an invisible character that when the tab delimitated file is exported and later imported into Contacts (Mac Software) out of 16,000 plus records Carriage Return Character are not filtered out by the Strip( function when some invisible characters are present.

I have made basically the same small database in Pan 6, run it, and the export is perfect.

In Pan X with the same data it gets messed up. Extra Line Feeds or Carriage Returns are not removed.

The Strip( function does not get rid of the Carriage Returns when these strange invisible characters are present in the data field.

I know this because if I put some data in and key in the Carriage Return the strip( removes the Carriage Return in a field that does not have these mystery characters. I document this in the sample databases.

Pan 6 Code:

;Called “StripsGhostCharacters-CR”

Field “StrippedData”

FormulaFill “”

Field “StrippedData”

FormulaFill «OriginalData»

Field “StrippedData”

Change "

" " "

FormulaFill stripprintable(«StrippedData»)

;

Pan X Code (Some functions have changed vs. Pan 6)

;Called “StripsGhostCharacters-CR”

Field “StrippedData”

FormulaFill “”

Field “StrippedData”

FormulaFill «OriginalData»

Field “StrippedData”

FormulaFill stripprintable(«StrippedData»)

;

formulafill lftocr(StrippedData)

;

formulafill strip(StrippedData)

I tried to paste the data in here with the invisible characters but when I did and copied it back the invisible characters are gone and the strip( function faithfully stripped the carriage returns out. So sending the actual small databases is the only way I can see at the moment of getting that information to someone.

It is like the strip( function skips over the data in Pan X when certain invisible characters are present.

I CAN SEND YOU THE PAN 6 AND PAN X SMALL DATABASES THAT ILLUSTRATE THIS.

Thanks.

strip( only effects the ends of a string: The strip( function strips off leading and trailing blanks and other whitespace (carriage returns, tabs, etc.)

If you’re trying to eliminate carriage returns within your text it’s not the solution.

Possibly replace(StrippedData,cr()," ") will do it if changing returns to spaces is satisfactory.

BTW, you have a lot of unnecessary steps in there. One can do it.


Field "StrippedData"
FormulaFill strip(replace(lftocr(OriginalData),cr()," "))

Thanks James.

I kept adding steps to try to troubleshoot what was going wrong.

I just took your advide and made a new procedure.

Field “StrippedData”

FormulaFill strip(replace(lftocr(OriginalData),cr()," "))

This has solved the problem.

Thanks.

I don’t really know why but it now works.

PROBLEM SOLVED.

Thank you again.

It’s taking the contents of OriginalData and converting line feeds to carriage returns, wherever they are in the data. Then it’s replacing all carriage returns with a space. And finally, the strip( is removing any leading or trailing “white space” characters whether they be carriage returns, spaces, tabs… and filling StrippedData with the results.

In the original procedure the carriage returns weren’t being removed by the stripprintable( function, they were being eliminated by the change statement. However, the syntax of the change statement is stricter in Panorama X, and the way you were using it did not work.

I think simply putting a comma between the parameters would have fixed your original code. However, I think Jim Cook’s solution using the replace( function is definitely better, so I would stick with that.

Thanks Jim.

It was driving me crazy.

Problem solved.