Add data only to newly added column in datatable

Hi Everyone,

My Requirement is

I need to extract tables from mails - i used extract datatable activity and it extracts tables from the mails

mail subject has certain title and then “- name”

so the output from that extract datatable activity has certains columns

  1. I need to add a new column “Name” and add the ‘name extracted from subject’ only to that column

Thanks in Advance

@kavya.s16 , To add the new column for datatable, you can use “AddColumn” activity.

Hi @kavya.s16 ,

You can use regex or String Split to extract the Name from the Mail Subject as provided below :

System.Text.RegularExpressions.Regex.Match(mailSubject,"(?<=-).*",RegexOptions.IgnoreCase).Value

Using Split Method :

Split(mailSubject,"-")(1).ToString

But there would be an Error if the Ssubject does not contain the - in it if we use split.

Also in Add Data Column Activity, you can add the extracted name as a Default Value to the Datatable. So that the value will be populated to all the rows.

Let us know if you are still in need of alternate suggestions.