hacky
(NotHacker)
September 20, 2024, 10:36am
1
Hi Team,
In my project, I am having config file entry variable as below:
"Hello Team,
Please find below table: [table]
Best Regards,
RPA Team"
My table:
I want to add a datatable in place of value “[table]”. But I am getting a NULL value.
Exprts, please help fast : @Anil_G , @AJ_Ask , @Kismet_Tosun
lrtetala
(Lakshman Reddy)
September 20, 2024, 10:45am
2
Hi @hacky
Use Create HTML Content activity
Regards,
Why not using clasic config style
hacky
(NotHacker)
September 20, 2024, 10:47am
4
Bro but I want to insert a datatable value within the string.
hacky
(NotHacker)
September 20, 2024, 10:48am
5
Thats exactly what I am doing. I need help with replacing ‘[table]’ keyword with my actual datatable like I attached on my question post.
Try
String.Join(Environment.NewLine, MyDataTable.AsEnumerable().Select(Function(row) String.Join(“,”, row.ItemArray)))
emailBody = emailBody.Replace(“[table]”, tableString)
hacky
(NotHacker)
September 20, 2024, 11:02am
7
I need headers also from my table to be in the list
hacky
(NotHacker)
September 20, 2024, 11:32am
8
experts. please help : @postwick , @ jitendra.saroj
Hi @hacky ,
You can try to convert your datatable into html string format.
postwick
(Paul Ostwick)
September 20, 2024, 2:27pm
10
As Rashmi said, you have to convert the datatable to HTML. There are lots of posts here on how to do this. Then you have just a HTML string and can use Replace to put the HTML string where [table] is, as Kismet mentioned.
hacky
(NotHacker)
September 27, 2024, 11:10am
11
Hello Team,
quick update.
in my case, output datatable followed by string manipulation operations worked.
thnks for your inputs.
system
(system)
Closed
September 30, 2024, 11:11am
12
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.