Deluge Scripts

Deluge Scripts

I have created an application in Creator with multiple forms that only I enter information into. One form collects stats and data from e-newsletters our company sends out. The other form I use to send our e-newsletter advertisers stats on their specific ad/url within the newsletter. I've been able to create a workflow that sends a nicely formatted email to the specified contact with their advertising results when I submit the form. 

What I want to be able to do is populate the advertiser form with information from the e-newsletter form. For instance: the number of emails sent, issue date, open rate and click-thru rate. We often have multiple ads per newsletter so I want to avoid having to enter that standard information more than once. It will also make it easier to look at the Analytics (I think).

I've spent days poring through all the Deluge tutorials and Help articles I can find but I really think I need some kind of complete and total basic overview. It's also confusing that I usually end up in the "this is for Zoho users who signed up before 2018" then I have to click over to the correct article and figure out the difference.

I am NOT a developer but I have gained some relational database knowledge from working and creating in Filemaker Pro. I got that hang of that but I just can't seem to get a handle on Deluge basics. I'm very confused about when to use certain commands and what needs to come before it. Do I always have to set a variable?

Here is the script I've created (I've been using the "on user input" "deluge script" options.) I have no idea what's wrong or right about it. I've gotten a bunch of different error messages but in this iteration the message is "Error at null."

Enews_Newsletter_ID = AD_Newsletter_ID;
Enews_Emails_Sent = AD_Emails_Sent;
if (input.AD_Newsletter_ID = input.Enews_Newsletter_ID) 
{
AD_Emails_Sent = (input.Enews_Emails_Sent);
}

I'm just trying to test this "Emails Sent" field to get the number from the Enews form to show up in the AD form. The ID field in the Enews form is a lookup, which works on the AD form. I just want to get the same information to autopopulate in the AD form. Clearly I don't have a good idea of what I'm doing. Any help/guidance is greatly appreciated!! THANKS IN ADVANCE!