how to get count in send mail task

  • i have a package where first task querys count of records in table and i am storing it in variable
    second task is send mail task i need to send the count value which comes from first execute sql task to send mail task expression.

    for that i have created one more variable messagequery and value hardcoded as "count of records: " +  @[User::RecCount] + "."

    in the property expression editor in send email task i selected as message source as property and selected the expression as @[User::messagequery] when i evaluate it just saying as
    "count of records: " +  @[User::RecCount] + "."
    but i am looking the message as  count of records: 6.

    Any help!!!

  • Put your expression directly in the email task. It sounds like you've written the expression as a string into a variable then referencing that variable will just give what you typed into it. 

    What i mean is did you enter this expression directly into the value field of the variable? If so what you see is what you get. 

    If you want to use the variable you must enter it into the expression property of the variable and then change the "Evaluate as Expression" property to True. 

    hth

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply