Print array of data row in single syantax

Hi
How to print array of data rows using single syntax. I just need a single column from it.
I tried this
String.join(Environment.NewLine, FilterDT(0).toString)

@KarthikBallary Do you need all Values of a Particular column as a String Separated by a NewLine ?

only particular column

Only a particular column String separated by new line

@KarthikBallary Check this expression :
String.join(Environment.NewLine,FilterDT.AsEnumerable.Select(Function(x)x(0).ToString).ToArray)

Hi @KarthikBallary

You can do like below SS
image

If you want to seperate it with new line then you can use Environment.NewLine OR vblf instead of ‘,’

matchValue variable is my array of Datarow
Make ForEach Activity TypeArgument as System.Data.DataRow

Hope this helps you
Mark as solution and like it :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

Hi I don’t need for each

String.Join(Environment.NewLine, filterDT.AsEnumerable.Select(Function(x)x(0).ToString).
here I get syntax error

@KarthikBallary What’s the Syntax error?

I think so der should be space between Function(x) and x(0).ToString

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

ctrl+space there is toarray

anyway…slight change
String.Join(Environment.NewLine, filterDT.AsEnumerable.Select(Function(x)x(0).ToString))
this works fine…tq so much

1 Like

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