January 30, 2017 at 9:28 am
Hey guys, I have 2 ssis variables Im using in order to send a notification email. I have a for each loop using another ssis variable of type object to loop through the file names inside it. The variable mapping is to an ssis variable called Current_File which is of type string. Inside the Expression task I have the following:
@[User::Email_Body] = @[User::Email_Body] + @[User::Current_Filename] + @[User::NewLine]
My problem is that the Email Body isn't getting updated. This has been working for a while but for some reason it stopped
January 30, 2017 at 9:33 am
dndaughtery - Monday, January 30, 2017 9:28 AMHey guys, I have 2 ssis variables Im using in order to send a notification email. I have a for each loop using another ssis variable of type object to loop through the file names inside it. The variable mapping is to an ssis variable called Current_File which is of type string. Inside the Expression task I have the following:@[User::Email_Body] = @[User::Email_Body] + @[User::Current_Filename] + @[User::NewLine]
My problem is that the Email Body isn't getting updated. This has been working for a while but for some reason it stopped
Perhaps it's because the variable is called Current_Filename rather than Current_File?
At what point in the process is Email_Body initialised? In the above, it is just being augmented.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
January 30, 2017 at 9:46 am
I figured it out. I set the initial value in the Email_Body variable in the variables window when I should have just did the concatenation and inserted the message in the Send Email tasks expression
January 30, 2017 at 9:55 am
dndaughtery - Monday, January 30, 2017 9:46 AMI figured it out. I set the initial value in the Email_Body variable in the variables window when I should have just did the concatenation and inserted the message in the Send Email tasks expression
Out of interest are all of the files in the same folder?
If so you could use the For Each Loop mapped to the folder and limked to a variable to store the currentFileName This could simplify your design.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply