January 16, 201312 yr We are wanting to send emails to a group of emails based on a search. For example, we want to run a search (custom each time) based on a particular criteria in our Customer table, then send a email to each of those Customers within that search. We have a Email table, which will keep track of the emails. So in my head, it would be something like this (after we performed the search): Allow User Abort (Off) Go to Layout (Customers) Loop Send Mail: Subject Email Table::Subject Message: "& Email Table::Body &" Go to next Record End Loop But I feel like I'm missing something in my logic. Or is this even possible?
January 17, 201312 yr me I see nothing wrong, .. missing some setup variable but that's the basic... its going out your client, not smtp giving no user dialog box as client mail does, I try building a sample stepping through monitoring your debug vars
January 17, 201312 yr Author Okay. I think I need help writing the variable. Can anyone give some advice or point me towards something that could help me with that?
January 29, 201312 yr Author Anyone have any thoughts? I need to define a variable that is taking the list of email addresses in the found set, and then send a email that I write, to each of them.
January 31, 201312 yr Hi, let me see if i can help a bit, I am not great writing... to write a var.. i usually have a general config file..used for saving misc fields, it usually has only 1 record, other config stuff there..home of most my global vars.. or use any field.. make it gobal. Everyone is diff maybe a field named "temp1"// maybe, make it a text box but it could be a calc field as here, I make that field temp = 2 , Then I do something like this displaying "No" using Case( temp=1 ; "Yes" ; temp=2 ; "No" ; "" ) Where there is another way to create a var Add a viable line to your script Call it $funnyvar or $$funnyvar both independent $$ hangs around forever until quit or $$ with a calc of "" to clear it , the repletion 3rd leave as default of 1 and I hardy use anything but 1 anyways, Then go Debug, Watch $funnyvar in debug as you do something like I set debut on first .. then maybe click my script. it in stepping debug mode.. or create a breakpoint somewhere down a ways into your script lines of code,... Here, then to increment maybe a counter in a loop $funnyvar +1 // as a calculation no more no less.. Point in exercise is using Watch or Debug stepping through each script line Have you found Debug,, also Watch.. their you can match your complex commands, then cut n paste it to your script I found this turn on a light for helping me. Rod
January 31, 201312 yr ok.. looking at the send mail line.. doesn't, can't recall, i think a dialog box to filin the basics for sending out mail client (not SMTP) looking at your line of code.. i don't see the email address Then 4 me, I probably use $vars as your stepping , more vars, helps stepping , looking too, then pass var to the Send mail command until you send the loop.. Depending too Maybe put a couple second delay message.. between each.. but suggest stepping debug... check error code after the Send mail command
January 31, 201312 yr Author I figured out I can send "multiple emails" based on Found Set. Sorta of right in front of me. So this will help me better explain what I'm looking for here. I will go to the customer table (layout) that has the email addresses. I'll perform a find, based on whatever criteria I have for that email. Then, I will go to the table which will hold the emails. I'll write a email (subject and body) and what I want to do is go BACK to that customer table (layout) and send that email I just wrote to that found set. With the found set ability in the Send Mail script step, I don't have to worry about a Loop. So perhaps what I need to know is how to send the last created Email in that Email table to my found set. Allow User Abort (Off) Go to Layout (Customers) Send Mail: Subject Email Table::Subject Message: "& Email Table::Body &" Does that make better sense?
February 5, 201312 yr Author Is this more of a relationship problem than a script problem? The above script works fine to send, it just doesn't bring over the email subject or body. Help!
February 5, 201312 yr If you are firing the script from the Email Table you can just set the subject and the body into variables and cary them to your Customers table. Allow User Abort (Off) SetVariable [ $subject ; Email Table::Subject Message ] SetVariable [ $body ; Email Table::body ] Go to Layout (Customers) Send Mail: Subject $subject: "& $body &" Otherwise you will have to have a relationship to the Email Table unless you are writing the email in Global fields.
Create an account or sign in to comment