• Thom A - Monday, November 6, 2017 9:31 AM

    70712 - Monday, November 6, 2017 9:20 AM

    Hi,

    Some test data bellow if I have understood those guidelines correctly. As I say, I'm able to create the email from this data, however, it is the dynamic variable that I am trying to pass to HTML via SQL server (If that makes sense) where I am having trouble.

    Thanks for that.

    I've tried running your code with the same data, however, this made me notice that your syntax for setting the value of @resultsHTML isn't valid, so I couldn't. Is this the part your speaking about? I'm also not sure what you mean by pass a variable to HTML? Are you trying to pass a value to a web server? Do you mean to create a hyperlink to something? For example, when you pass a parameter to a webpage, this is often done by adding it to the end of the web address. For example http://www.mywebsite.com/index.html?name=Thom_A passes a parameter name to the page, with the value Thom_A.

    So I'm creating the variable @Columns which should then inform how many columns should be in the email. But the HTML code creating the table/email only pastes the contents of the variable. I have two different versions of the @resultsHTML the second one contains the variable which is causing me a problem.

    Now that I think about it, I hope that what I'm trying to do is possible in the first instance.

    Thanks for your help thus far.