Exporting Entity to Text with a header row - Is it Possible?
Application Type
Traditional Web

Hi everyone, hope you have had a great week. 

I have successfully learned how to export an entity into Text format separated by Pipe Delimiter. But i have a question

How do i include a row at the top that displays the headers. For example, my export currently looks like this:

Id like it to look like this:

My Action looks like this:

Thank you as always for your help and advice

Mike

Hello Michael,

You can assign the header to var1 before starting loop.

Var1 ="header1|header2|header3" + newline ()

Wow! As simple as that. A little embarrassed :) Thank you for your help. Marked as Solution

Solution

Hello Michael,

Please see attached sample OML, if you want to implement the login into the way you are trying with some minor changes. Kindly refer the GetData Server action for the logic.

Thanks & Kind Regards,

Sachin

HeaderDemo.oml

Solution

Hello @Michael Freath,

I would like to suggest using the CSVUtil forge component which will make things very easy for you.

I have attached the oml as well.

Sample output from the above logic with column header:

Regards,

AJ

ExportEntity.oml

Solution

Hello Michael,

Please see attached sample OML, if you want to implement the login into the way you are trying with some minor changes. Kindly refer the GetData Server action for the logic.

Thanks & Kind Regards,

Sachin

HeaderDemo.oml

Hello Michael,

You can assign the header to var1 before starting loop.

Var1 ="header1|header2|header3" + newline ()

Wow! As simple as that. A little embarrassed :) Thank you for your help. Marked as Solution

Thank you everyone for your help. I believe all 3 suggestions were acceptable solutions. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.