LWSChad Posted August 15, 2014 Report Share Posted August 15, 2014 Hello; I am working on a Report DataPage that's purpose is to build an email. Each email will be based on a Lead (frmEditEmail's data source is tblLead). Many leads have multiple people, cars, addresses, etc. Example that is working: People in LEAD_1 -> David txtField_fNames: Hi David,.... Example I'm stuck on: People in LEAD_2 -> Alli and Ben txtField_fNames: Hi Alli and Ben,.... (Three or more people will use some js logic to add commas and move and to the end) I cannot figure out how to get more than one name into txtField_fNames. Any Ideas? THANKS Quote Link to comment Share on other sites More sharing options...
LWSChad Posted August 15, 2014 Author Report Share Posted August 15, 2014 Got It! I use HTML Blocks, assign them id's, and use the following js. function bodyReplace() { var fn = document.getElementById("person"); var fns = fn.getElementsByClassName("fn"); var fnArray = []; for (var i = 0; i < fns.length; i += 1) { fnArray.push(fns[i].innerHTML); } var firstName = document.getElementById("firstName").innerHTML; var str = document.getElementById("emlMessage").innerHTML; var str = str.replace("[[FirstName]]", fnArray); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.