web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Tab as delimiter

(0) ShareShare
ReportReport
Posted on by 1,307
Hi,
 
I am generating a TextStreamIO file and saving it as a CSV file attachment. I am planning to use tab as delimiter. I cannot use comma as a delimiter as one of my table field values has commas in its data. I am inserting all table fields value in a container.
But the code I am writing is not populating the data properly. All the table fields info is getting populated in the first column of CSV file rather than each table field info getting displayed in each column.
 
public class xxxxxxxService
{
    xxxxxxxContract    contract;
    CustTrans                               currentTrans;    
    container                               custTrans;
    TextStreamIo                            io;    
    System.IO.Stream                        stream; 
}
 
 
private void initIO()
    {
        io                  = TextStreamIo::constructForWrite(65001);
        statementAsOfDate    = contract.parmToDate();
         
        io.outFieldDelimiter(///);  
    }
 
protected void populateStreamline()
    {
        CustTable           custTable                   = CustTable::find(currentTrans.AccountNum);

        custTrans = [                       
                        custTable.PaymTermId,                                                       //Payment terms            
                        currentTrans.TransDate,                                                     //invoice date
                        currentTrans.Invoice,                                                       //Invoice #
                        currentTrans.Txt,                                             //Description
                    ];                     
        recordCount++ ;
        io.writeExp(custTrans);
    
}
 
 
 
 
 
 
 
I have the same question (0)
  • Suggested answer
    Layan Jwei Profile Picture
    8,034 Super User 2025 Season 2 on at
    Tab as delimiter
    Hi,
     
    I think this is what represents tab:
    outFieldDelimiter("\t")
    So replace your delimiter with this and try it.
     
    For more details, please check this link
     
    Thanks,
    Layan Jweihan 
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Verified answer
    Martin Dráb Profile Picture
    236,320 Most Valuable Professional on at
    Tab as delimiter
    Also note that it won't CSV (comma-separated values) anymore and that CSV does support values containing comma, which nullifies your reason for a different separator. It's done by putting quotation marks around the value.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,100

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 890 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 633 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans