How to send Mail with subject having the respective input value(taken from part of mail subject)?

Hi All,

I’m using “For Each Row in Data Table” activity.
Inside that It opens an aplication and writes the values in the respective fields using “Type into” activity.
After that it sends a mail to the client with subject “Taskid + " has been created succesfully"

" Data Table contains (TypeofIncident, Taskid, Status and TaskName).

Incident Type can be : Incident, Service Request, Complaint, Question, Security.


But On every execution of each row, It is sending mail with same task id . It supposed to be as per the input. but it is considering the last unread mail’s task id.

Please help me resolve this issue.

thanks in Advance :slight_smile:


Check if the value is getting retrieved properly…

Use a log message and see if the data is getting proper in the loop…or use a pause activity and check the locals panel


Into For Each Row in Data Table, verify if you set TaskID as current row instead fixed value, like currentRow(0) and verify if you datatable has right tasks id get from mail to isolate where the problem occur.
If problems continues, share some screenshoots for both flows to help figure out whats going on

It is entering the correct Taskid in the Application but failing to update the same in Mail.

Screenshot of inside for each row activity:



What sis you use in send…may be its hardcoded there


can you provide the subject set for Send SMTP Mail Message?


Where do you assign Taskid variable? Sounds like you assigned outside of For Each Row in DataTable. You can change Subject to use row(“Taskid”).ToString + has been created… instead Taskid variable or validate the taskid variable assignment to ensure that for each row it is assign with new value

1 Like

Yes Taskid is assigned outside this sequence inside for each (mail in ListofMails)

But I have given scope as Main. That’s why I passed that variable directly.

Anyway after giving row(“Taskid”).ToString , it’s working perfectly

Thank you :slight_smile:

1 Like

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