Jump to content

Multiple Records One Report


Recommended Posts

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

Link to comment
Share on other sites

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);
        }

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...