1) base your portal on the junction table and include fields from the other, related table (contacts?) on the far side of the junction table to supply name on other such info. Then you can include the radio button field as well.
2) Put a button in the portal row that performs a script that includes the send mail script step. The mouse click on the button will also put the focus on that portal row so references in your send mail step to fields in the portal will reference the correct record. If necessary, your script can use Go To Related Records to pull up this record (or the contact record ) on another layout, but that doesn't seem necessary from what you have posted so far.
Thanks for your reply.
I think I may not have been quite specific enough, but nevermind, - a lovely fellow wrote a script as follows, which can be ammended for a button on each relevant table.
Apologies if I havn't re-written the script here acording to convention...
Go to Layout ["Contacts_Projects"(Contacts_Projects)]
Perform Find [Criteria: Contacts_Projects::Email Job Contacts:"YES"]
Send Mail [Send via E-mail Client; BCC:Contacts::Personal Email & ";" & Contacts::Organisation Email]
Go to Layout [original layout]
AMAZING! This changed my world.
It did, however, leave me with another question.
At the moment the script is searching for all the ‘yes’ values in all the records of the layout as a whole, which means that an email is being generated and sent to all the Contacts in the whole layout with ‘yes’ selected in the corrosponding field.
What I need to do is generate an email only to the selected Contacts in the portal of the specific record that I chose to press the ‘send email’ button in.
I think I have two choices, neither of which I’ve been able to make any progress at all on in the last couple days:
- Write a new script to reset the Boolean values in the portal back to ‘no’ when the record is exited
- Alter the current ‘Send Mail’ script a bit to be more specific so as it’s only sending the email to the selected Contacts in the specific record that I chose to press the ‘send email’ button in.
It all seems so simple, but try as I might, I can’t seem to get any closer. It’s been days and I still suck at scripting.
If you or anyone has any advice that would be great.
Instead of go to layout, use:
Go To Related Record [Show only related records; From table: Contacts_Projects; Using layout: "Contacts_Projects" (Contacts_Projects)]
This produces a found set of just the records in your portal for the current record from which you performed this script.
Enter Find mode  //clear the pause check box
Set Field [Contacts_Projects::Email Job Contacts ; "yes" ]
Set Error capture [on]
Constrain found set
This reduces your found set to just those with the radio button selected.