|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Display multiple Line items in CFMail
Does someone have a solution for displaying multiple line items inBen Densmore 04/26/04 02:10 P In CFMX, you can set a recordset cell to be another recordset. You couldBarney Boisvert 04/26/04 02:21 P > From: Ben DensmorePhilip Arnold 04/26/04 02:35 P You can put a <cfoutput> in the <cfmail> tag to loop over the groupedPascal Peters 04/27/04 03:49 A Does someone have a solution for displaying multiple line items in CFMail when you use the group attribute in a <cfoutput> tag? I have a query that returns some order information that could have multiple part numbers. I am grouping on the order number so when an email goes out it doesn't send the same email more than once if they have multiple part numbers. The problem is that by grouping it, it will only display one part number in the email. If I output the page I can use a regular <cfoutput> tag nested inside of the grouped <cfoutput> tag which gives me all the part numbers ordered for a specific customer, but trying to do that in CFMail causes the code to break. I can't seem to think of a way to do this. Thanks, Ben In CFMX, you can set a recordset cell to be another recordset. You could preprocess your recordset converting the per-person part list to a nested recordset, and then your CFMAIL wouldn't use grouping. IN each message, you'd just loop over the inner recordset to output the list. If you go that route, you have to dereference the inner recordset to a 'normal' variable before you can use it, you can't just reference the recordset column that holds it. Cheers, barneyb ----- Excess quoted text cut - see Original Post for more ----- ----- Excess quoted text cut - see Original Post for more ----- If I'm understand what you're trying to do Don't send the CFMAIL with the QUERY paramter, but build the content before you send the CFMAIL You can put a <cfoutput> in the <cfmail> tag to loop over the grouped records. Same as <cfoutput group=...> This code works fine in CF5. I'm not running CFMX right now, so I didn't test. <cfmail query="qTest" from="#variables.from#" to="#qTest.email#" group="email" subject="test"> <cfoutput> #qTest.text# </cfoutput> </cfmail> Pascal ----- Excess quoted text cut - see Original Post for more -----
|
February 08, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||