Datatable transpose

Hi all,

I have this as input from a datatable with a variable amount of rows (in this example 2)

variable 1
variable 2

Expected output:
variable 1 AND variable 2

How do i get to this result?
Thanks in advance!

Loop through all the rows of the data table and concatenate the row values to a string, along with ’ AND '. Handle conditions for last row - should add without AND.

Hope this helps.

Hi @Kaderms,

Thanks for your valuable input. It seems like a good theoretical solution, something I had in my as well.
However, don’t really know how to start and to the concatenation and the condition
Would you care to share an xaml?

Thanks in advance

I can give you a pseudocode here. As I’m not on my machine now.

Assign newString = β€œβ€
For Each Row in your data table
Assign newString = newString + row.ToString + " AND "

(After for each row activity)
Assign newString = newString.substring(0, newString.length - 5)

Let me know if you still need the xaml

1 Like

Brilliant, thanks!

1 Like

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