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

Announcements

No record found.

News and Announcements icon
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);
    
}
 
 
 
 
 
 
 
  • Suggested answer
    Layan Jwei Profile Picture
    8,428 Super User 2026 Season 2 on at
    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
    241,637 Most Valuable Professional on at
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 284 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 217

#3
Subra Profile Picture

Subra 200 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans