August 20, 2009 at 4:24 pm
what expression do i need to add? i am bit confused because we tried with too many expressions.
August 20, 2009 at 4:28 pm
Here's a recap on what we just did:
1. We tested the expression @[User::ErrorCount] > 0 && @[User::ErrorCount] <= @[User::MaxCount]
2. You said it was not working and you didn't get an e-mail.
3. We removed the expression and set a break point so we could look at the runtime variable values to see why no e-mail was sent.
4. We found that the error count variable had a value of 495 which is outside of the 1-50 range that you defined so you should not have gotten an e-mail.
Now, we're back to putting the expression from #1 back into your precedence constraint. That expression will work based off of your requirements to send an e-mail if there are between 1 and 50 errors.
August 20, 2009 at 4:41 pm
I got your point, but my fault I couldnt explain you clearly what I am doing, let me explain agan, I need to create a package which will write an error row on flat file, suppose if there are 495 errorows but it will anyhow write upto 50 error rows on flat file. so when the package executes with 495 errors, it will write 50 errors in a flat file but doesnt send me an email with
@[User::ErrorCount] > 0 && @[User::ErrorCount] <= @[User::MaxCount] condition, may be i need to change something on data flow tab.
August 20, 2009 at 4:51 pm
Your original post on this thread stated:
when ever there is an error upto 50 on a flat file it should send me an email
That tells me that you want an e-mail when there are errors upto 50 errors. That is what we did.
Now, that expression is based off of how many errors you have in your data flow. The ErrorCount variable shows you the total # of errors, in this case 495.
You are saying that you only want to write 50 of those errors to a file, but you want an e-mail stating that there were errors, right?
That tells me that you want an e-mail any time there are errors, you don't really want to limit the e-mail to 1-50 errors.
In this example, you've got 495 error rows. Do you want an e-mail or not?
August 20, 2009 at 4:55 pm
yes i need email when ever error occurs and dont need email when there are no errors at alll. In thisi condition (495) errors yes i need an email becuase in this situation i have developed package in such a way that it will write 50 errors on flat file. bottom line is that i need to get an email if i get an error message.
August 20, 2009 at 4:56 pm
If you need an e-mail regardless of how many errors that are, you need to change the expression to be:
@[User::ErrorCount] > 0
August 20, 2009 at 4:59 pm
u mean i just need add that expression.on email task presedence?
August 20, 2009 at 5:01 pm
Yes. If the expression evaluates to True, the e-mail task will run. The expression will evaluate to True any time there are more than 0 errors.
August 20, 2009 at 5:04 pm
seems to be working now, thank you very much 😛
appriciated
August 20, 2009 at 5:05 pm
Viewing 10 posts - 31 through 39 (of 39 total)
You must be logged in to reply to this topic. Login to reply