Help- Append Line

Issue: Append line wont print all the content of an out_arg of type String from a custom activity used as a dependency in a project.

Background.
I have a library that has on out_arg that will be consumed by another process. In this library, this value of the out_out arg was written out to a text file using AppendLine within a For each Row in DT. The outcome is fine in this case, I’m getting the count of what I’m expecting.

image
The for each row in DT

image
Using the append line within the For Each


The declaration of the out_arg

image
The file written by Append line

So when I use this library as a dependency in another process, I stored that out_arg in a varible
image
I then use Append Line /Write Line to write to text file.
image
I’m only getting one record, but I’m sure all the records are processed because they are all in my output panel

How can I get all these records to write to a text file ? I have tried:
Using Generate data table activity to convert the out_arg to a DT, then I used an Append Line within a For Each Row in DT, but that still didnt work

@Yomi_Oluwadara

As per screenshot the out_argument you are getting is inside a loop so I beleive the value is getting updated for each row

can you confirm if you are getting only last line in the variable…if so the argument from library is given only one line at a time…instead you have to change it to give all lines or append all lines and then pass

cheers

@Anil_G Thanks,
Yes ! I’m getting the last line in the variable and you are right that the out_arg is giving just one.
How do I make the out_arg give all the lines? I’m already appending from within the loop?

@Yomi_Oluwadara

In the for loop are you using assign like this?

Out_var = Outvar + newline to be appended

I see only append text then it will append to text file but not the string variable

Cheers

@Anil_G that seemed to have worked, and now I have the .ext looking like this


, if I want each record to be on a single row like this,
image
who best cab this be acheived? My new line insertion does not work

I tried using Split like below, but it didnt work:
image

@Yomi_Oluwadara

Use like this

Out_str = out_str + Environment.NewLine + New line string here

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.