Solved HTML and Variables

I don't know how @Minty does it, but I actually have a table showing the substitution text, with another column showing how to obtain the substitution. So [phonenumber] will know it needs to look up the phone number field from the contact record. That way you can add new variables without needing to recode each time.
 
I haven't got it working but I did get the isolation of the issue which is that the copy from the table to the HTMBody is not working out. So I know that I need to to find a different way. I don't know about placeholders and Replace() functions and I will investigate that. If you have any example links, that would be great but otherwise Google is my friend. I am a believer that I learn a lot more by searching to resolve issues so I really only post here if I think it should be working and isn't or I really cannot find out how to take the next step. As it often turns out I just don't know how to frame the question properly - the answer is out there, I am just not asking correctly.

vblEmailID is used to locate the correct record - it is the autonumber. I just hard code it - in this instance vblEMailId is 6 which is the right record in the table for this email.
Yes, but the point I am tryng to get across is EmailID merely locates the record, then you need to take the field that holds the data, let's call it EmailBody and assign that to a variable, then replace the place markers with your variables, then assign to the HTML body.?
 
Yes, correct - I just need to work on the replace placemarkers bit.
 
I don't know how @Minty does it, but I actually have a table showing the substitution text, with another column showing how to obtain the substitution. So [phonenumber] will know it needs to look up the phone number field from the contact record. That way you can add new variables without needing to recode each time.
Slick! I might do this just because it is better than a recode.
 

Users who are viewing this thread

Back
Top Bottom