chopsuix Regular Contributor.
Regular Contributor.
557 views

How to add line break to notes field using import with dataport?

Jump to solution

I'm using dataport to create new records in HPRM. So far everything is working fine. I have one issue where some records have multiple lines in the "notes field" and I can't configure the txt files to incorporate the linebreak example

When I use the import the notes field shows:

John, Doe Doctor

How do I configure the text file so that it imports and shows the notes field as:

John, Doe

Doctor

Haven't had much luck finding an answer

Thanks

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Outstanding Contributor.. AG_LTBit Outstanding Contributor..
Outstanding Contributor..

Re: How to add line break to notes field using import with dataport?

Jump to solution

Hi chopsuix,

To add a line you just need to use a carriage return and a line feed between the items, in windows text edotors this is achieved with a \r\n

So in your example you would have;

John, Doe\r\nDoctor

This will result in the Doctor being placed at the beginning of the new line.

The easiest way to workout formatting of dataport is to create a test record (in a test dataset) of exactly what you want and then export it, you will then have an example of exactly how to achieve what you want.

Good luck,

AG.

-----------------------------------------------------------------------
www.ltbit.com.au
4 Replies
Outstanding Contributor.. AG_LTBit Outstanding Contributor..
Outstanding Contributor..

Re: How to add line break to notes field using import with dataport?

Jump to solution

Hi chopsuix,

To add a line you just need to use a carriage return and a line feed between the items, in windows text edotors this is achieved with a \r\n

So in your example you would have;

John, Doe\r\nDoctor

This will result in the Doctor being placed at the beginning of the new line.

The easiest way to workout formatting of dataport is to create a test record (in a test dataset) of exactly what you want and then export it, you will then have an example of exactly how to achieve what you want.

Good luck,

AG.

-----------------------------------------------------------------------
www.ltbit.com.au
chopsuix Regular Contributor.
Regular Contributor.

Re: How to add line break to notes field using import with dataport?

Jump to solution

Great thanks a lot. I added the additional \r\n to the "notes" column in excel where I wanted the line break and this worked. A follow up question though is that for some reason when I save the .txt file in Excel and open it in notepad, " (quotation marks) have been added to some of the cells but don't show up in excel. Any ideas?

0 Likes
Highlighted
Outstanding Contributor.. Steve Macukat Outstanding Contributor..
Outstanding Contributor..

Re: How to add line break to notes field using import with dataport?

Jump to solution

Excel will do this for cells containing a comma.  It could happen with other forms of punctuation, though I haven't tested recently.

0 Likes
Sten28 Outstanding Contributor.
Outstanding Contributor.

Re: How to add line break to notes field using import with dataport?

Jump to solution

Correct, Excel adds in quotes when saving to Text when the cell contains a comma.

You must remove these quotes before running the file in DataPort, otherwise you may run into import issues.

The simplest way to do this is to open your text file in a text editor (e.g. Notepad++ or TextPad) and use Find/Replace to remove all quotes - see attached image for an example.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.