I am not able to generate tab seperated text file.

Requirement:-I need output as text file where data needs to be separated by tab.  Also the data  should be formatted each record should be in seperate line.

Actual: -

      1. The output generated is not delimited by tab. 

      2. The data in the text file is coming from the same row.

 Steps:-

    1.  I am using  "Text Doc from Template" smart service where my template is having all column names. In the next line I am providing data as  ###data### .

    2.  I am fetching data from the expression rule query entity and using foreach loop I am concatinating all fields and trying with char(9) for space. (This is not specific for tab

         but I don't know how to provide tab delimiter). 

   3.  The data in expression rule is coming as expected in two lines. This rule is called in script task in model and the value is provided to the smart service for generating text file. 

        But the data in output text file is starting from the second line but the second row is also getting started from the same line which is not expected.

        

    Example :-  template:-

            Column1 column2 ---column n

            ###data###

  Example  Expression rule:-

   substitute(
load(
local!output: todatasubset(rule!APPLN_QueryEntity(ri!id)),
local!outputdata,
local!tabspace:char(9),  /* Not sure how to provide tab*\
local!data:a!forEach(
local!output,
""&fv!item.Column1&local!tabspace&datetext(fv!item.Column2,"yyyy-MM-dd")&local!tabspace&fv!item.Column3&"
"
),

""&local!data&""
,
";","
")

                                       

   

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data