I’m having a challenge setting up for sending emails via mail merge. The actual sending works, but I’m trying to setup for various types of emails.
I have a form GenerateEmails based on the EmailTypes table:
EmailTypesKey (text) : GENERIC, BOARD or LEADERS
EmailType (text) : Generic Email, Board Reports or Study Group Leaders
Seq (integer) : to select the records in the desired order
DefaultSubject (text)
DefaultBody (memo)
I’ve added fields to the GenerateEmails General page, which are not coming from the table, in the hopes of using them like screen fields in reports or processes.
I’ve added a page called Members which shows the SelectedMembers table records via a DataView. When any of these members are clicked, it “flips” the IsSelected value for that member in the SelectedMembers table. The intent is to collect all the members with IsSelected=true and create a string of email addresses. This part is working fine. What I want to do is populate that list into the To textbox on the General page. This part is not working. I can’t figure out how to populate a textbox via its fieldID. There is no entry in the Field property, because I’m not storing these values, just using them to send the emails.
It seems to me I either need to figure out how to populate that text box with the value I want, or perhaps switch to a process instead, which does allow screen fields.
If I switch to a process, then of course I can’t have a second page showing Members. I would have to open a new form to select members from a DataView, then click a button to return to the process. I can do this with a form using previousAction. I don’t know if that works to return me to a process.
So, Can I return to the process that was active before I opened a form? This is working fine from Form → Form → Back to Form. Just don’t know if it works to return to a process.
I need advice on how to accomplish this requirement in Five.
Which is better, using a form or a process to start with?
If either is equivalent, a form is somewhat easier, but must figure out how to populate an unbound textbox, then use its value when actually sending the email.
The intent of all this is to create an email containing default subject and text (stored in the table), display those in the form, be able to add or change the text of the To, Subject or Body textbox, then send the email.
I don’t really want to save any changes such as To, Subject or Body text, so it doesn’t make sense to add those to the table, because once changing them, I’d have to clear those fields and save the record.
I hope I’ve described the issue properly, and that you can tell me how to accomplish this in Five. Thanks…
