I am using the following code to print this output,
DT from where I am brining the current output
is it possible to get only the values except the column header or any way to cut off the column header?
Which data type do you need as result?
If string type, the following will work.
strResult = String.Join(vbCrLf,dt.AsEnumerable.Select(Function(r) r("sap_code").ToString).Distinct)
a datatable will allways define a datacolumn along with its column name
depending on your outputting needs we can check for options on how to surpress it. Maybe you can elaborate more on this.
also have a look at this code statement.
String.Join(Environment.NewLine, filtered_dt.DefaultView.ToTable(True,“sap_code”).Select(Function (x) x(0)))
it worked, thank you @Yoichi
I want to input each of the value separately in a typeinto activity
rn, if I am inputting through the strresult all of the values are passing altogether, I am already insdie a for each DT loop with another DT
how may I input one after another and after inputting one value to typeinto I will input other data too, after completing all of the inputs I will go for second data then third…
Can you help me out once more? @Yoichi
If it’s necessary to input them separately, it might be better to use not single string but array of string.
arrStr = dt.AsEnumerable.Select(Function(r) r("sap_code").ToString).Distinct
Then use type into with dynamic selector in ForEach
If you’re trying to input each value separately into a Type Into, then you don’t do all this Join stuff.
You just For Each Row in Datatable and then within that you have your Type Into with CurrentRow(“sap_code”).ToString as the text to type.
@postwick in my CurrentRow the sap_code is not available, this is why I am facing issue to develop my usecase
facing this error while trying the assign activity
variable type I am using is, Array of String
Sorry, i had mistake. Expression in the above image is correct.Can you try to add .ToArray at the end of the expression.
arrStr = dt.AsEnumerable.Select(Function(r) r("sap_code").ToString).Distinct.ToArray
You literally show it in your output.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.