How can i write all rows which matches my condition to a text file

When i use “write text file” in this example, its writing only last row into text file. But how can i write all rows which matches the condition into a text file. Can someone help me with this?

My files.zip (2.2 KB)

@Venkat07

Filter your table with the desired condition. The result will be Array of Data Row.

Use Output Data Table Activity - Pass DataTable as arr.CopyToDataTable(). The result will be String Object

Use Write Text File activity and pass the string object to the same.

Thanks,
Madhura

1 Like

Thanks @Madhuraj

I tried with the steps provided by you. When i am converting the Data row of array to string i am facing following error

clubMembers.CopyToDataTable()

“CopyToDataTable is not a member of ‘System.Array’”

Here ‘clubMembers’ is a Data Row of Array which i used. Could you please help me to resolve this?

Thanks
VenkatMain.xaml (5.9 KB)

@Venkat07

Try clubMembers.CopyToDataTable

@Venkat07 Instead of write text file activity use append line activity this will work

2 Likes

Hi @ranjith

Tried clubMembers.CopyToDataTable. But didnt worked out.

Please find the attached xaml file for reference

Thanks
VenkatMain.xaml (6.0 KB)

Perfect @indra
It worked and now i can see all rows in the output file.

Thanks
Venkat

1 Like

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