I am attempting something that I thought had been previously addressed but can not find the link to it. I am using the exportToHTML in the table component. I want to add another string of HTML to the table component before sending it via email. Here is what I have so far.
table = rootcontainer.getComponent("Table")
subject="<html><body><h1>Req. for Parts</h1></body></html>"
body = table.exportToHTML("table",1000)
sendable=subject + body
then I use the fpmi.net.email function and use sendable as what is to be sent
when I add this it works as I expected. However when I want to add a variable to the string above I get an error message about not being able to add, and, or to the string. Here is the revised version that does not work.
the only thing that changes is the subject
subject ="<html><body><h1>Req. for Parts</h1><h2>Location:"+mn+"</h2></body></html>"
I have tried the + symbol, the word AND, commas and also tried place str() around the MN even though the MN should already be a string. But each comes back with error messages.
So what simple expression am I missing to add this variable to the string?
Thanks and have a great day.