close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Universal Email Recordset Loop with dynamic fields

Thread began 4/20/2013 2:37 pm by robcorrick409194 | Last modified 4/25/2013 3:37 pm by robcorrick409194 | 1704 views | 6 replies |

robcorrick409194

Universal Email Recordset Loop with dynamic fields

I am using the batch feature in Universal Email with the Recordset Loop. I would like to accomplish two objectives with this batch:

(1) Use dynamic fields from my database in the email message
(2) Pass a few extra fields to the email log.

My email log works perfectly with these objectives, thanks to your help, provided that I just send one email, not using the batch feature. I successfully use dynamic fields in the email and pass values to some new fields of the email log that I have set up in the database using hidden fields in the email form. When I use the batch feature, the emails rotate, and they are sent out to recipients, but the content of the email does not change dynamically and the email log field that I have created are not updated. Each email and log record reflects the content of the first record in the database from which I am sending the emails. Other than the email address, the array of dynamic data is not being passed to each email and log record. Any help would be appreciated.

Sign in to reply to this post

Jason ByrnesWebAssist

see this thread for details:
http://www.webassist.com/forums/posts.php?id=17869

Sign in to reply to this post

robcorrick409194

Thank you Jason for this thread #17869 or Ray Bourdin. I can't get it to work yet. So if I wanted to add three variables to the recordset loop ("variable1", "variable2" and "variable3" ) from my recordset named "test", the same recordset from which my email loop is sourced, how would I change Ray Bourdin's code below. Thanks.

<?php
global $RecipArray;
global $RecipIndex;
?>

<?php echo($RecipArray[$RecipIndex][0]["[yourColumnName]"]); ?>

Sign in to reply to this post

Jason ByrnesWebAssist

  So if I wanted to add three variables to the recordset loop  



to add variables to the recordset, you would need to edit the recordset, how should these variables effect the results of the recordset?

Sign in to reply to this post

robcorrick409194

I have already changed and defined the recordset "test" to include the variables (UserID, UserFirstName, and UserLastName) and I have tested that I am in fact returning these variables from the recordset. It seems that I am not coding and defining these variables globally, which was why I was asking how Ray's coding should be changed. I am trying to accomplish two objectives: (1) pass these variables to the WA email log for each record in the loop, and (2) use these as dynamic variables in the email sent to each UserEmail recipient in the loop. So I am attempting to reference these variables both in the email body and the Email Log Bindings of Universal Email. I have not been successful in these objectives. Thanks for responding.

Sign in to reply to this post

Jason ByrnesWebAssist

your question was a little confusing in the way it was worded.

to add those recordset columns to the email, the code:
<?php echo($RecipArray[$RecipIndex][0]["[yourColumnName]"]); ?>

should be:
UserID: <?php echo($RecipArray[$RecipIndex][0]["UserID"]); ?>
UserFirstName: <?php echo($RecipArray[$RecipIndex][0]["UserFirstName"]); ?>
UserLastName: <?php echo($RecipArray[$RecipIndex][0]["UserLastName"]); ?>

Sign in to reply to this post

robcorrick409194

Email Log Recordset Loop Adding Variables

Thanks Jason. This works very well.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...