Data table to sting

A datatable is a complex datatype containing of rows and columns plus many other properties such as settings for the columns (ie allows null, default value, etc), settings for the table, etc.

You can’t just drop a datatable in the body of an email and expect it to work.

If you want to put it in an email I suspect you probably want a nicely formatted HTML table. For that you’ll need to use a string variable, start it with “

” and then For Each Row through the datatable, concatenating each HTML row as you go, then at the end add on “
” to the string.

Then you can use your string variable in the body of the email. If you want more detail on this, just search the forum for “datatable html table” or “datatable in email.”

There are even ways to do it with single line expressions like in this post…