Email only updated fields in a form

If you have a long form that you use to update data in your database on a regular basis by someone other that a "Site Administrator" then you would probably want to send an email to the "Site Administrator" notifying them about the updated data.

Question: How do the Site Administrator find the updated information in the email?

Answer: Only sent the updated information.

Follow the following steps to set this up.

  1. Build your form as usual using nextensio form
  2. Create an an additional recordset listing the fields you want to check if they are updated.
  3. Add your Send Email server behaviour
  4. Add a "Custom Trigger" of type before and link it to the "Update Transaction"
    The content of the custom trigger might be something like this:
    > First we define a global variable that will be available across all functions
    > Then we compare the new value with the old value
    > If the values are different, update the global variable with whatever you want to display
        global $add_status;
        if ($tNG->getColumnValue('ad_status') != $tNG->getSavedValue('ad_status')) {
        $add_status = 'Status Changed to: '.$tNG->getColumnValue('ad_status').'<br />';
        global $bal_due;
        if ($tNG->getColumnValue('ad_total_amount') != $tNG->getSavedValue('ad_total_amount')) {
        $bal_due = 'Balance Due: '.$tNG->getColumnValue('ad_total_amount').'<br />';
  5. Now set a condition for when the email needs to be sent, this condition checks the updated value against the original values and could look like this:
    > I am checking if the ad_status or the ad_total_amount has been updated
    {POST.ad_status} != {rs_old_data.ad_status} || {POST.ad_total_amount} != {rs_old_data.ad_total_amount}
  6. Compose the email that needs to be sent and make sure the email format has been set to HTML
    Your email might look something like this:
    The following changes has been made.<br />
    End of updates
  7. By adding html in the global variable in step 4 you avoid the need of html in your email and ending up with blank spaces


Exelwebs SSL Certificates
exelwebs VPS
Cycle Africa

Although we try to ensure all the articles submitted are valid it is your responsibility to make sure you have backups before you use these suggestions on your pc or websites.
We do not take any responsibility for any data-loss, loss in functionality or any problem that might arise in what-ever way or form by making use of the information on this site.

"Friends of Interakt" has no connection to the Adobe Interakt Company