Chrism 0 Posted October 29, 2020 Share Posted October 29, 2020 Hi, I have a script that sends an email to the current found set of contacts, each contact has a relationship to the company. When I perform the script it also adds an interaction to the Company interaction related to that contact. But even though the correct emails are being sent, it is only adding the interaction to the company of first contact in the found set it is emailing, and not the rest. I have attached pic of the last bit of the script that does the interaction part Link to post Share on other sites
comment 1,777 Posted October 29, 2020 Share Posted October 29, 2020 Well, do some debugging and check what is in the $memberID_list variable at each step. Link to post Share on other sites
Bertie 0 Posted October 29, 2020 Share Posted October 29, 2020 "MEMBER::zz_Listof_ID" isn't a repeating field is it? Link to post Share on other sites
Chrism 0 Posted October 29, 2020 Author Share Posted October 29, 2020 12 minutes ago, comment said: Well, do some debugging and check what is in the $memberID_list variable at each step. I have just enabled the advanced tools, so will have a look at debugging. thanks 4 minutes ago, Bertie said: "MEMBER::zz_Listof_ID" isn't a repeating field is it? Not sure, see pic of the field data Link to post Share on other sites
Chrism 0 Posted October 30, 2020 Author Share Posted October 30, 2020 (edited) 17 hours ago, comment said: Well, do some debugging and check what is in the $memberID_list variable at each step. OK the $memberID_list variable only ever contains a single number, I assume it should have a list? There are 4 records in the found set Edited October 30, 2020 by Chrism Link to post Share on other sites
comment 1,777 Posted October 30, 2020 Share Posted October 30, 2020 11 minutes ago, Chrism said: the $memberID_list variable only ever contains a single number, I assume it should have a list? Yes, it should - provided you are on a layout of the MEMBER table and you have a found set of more than one record when you populate the variable. Link to post Share on other sites
Chrism 0 Posted October 30, 2020 Author Share Posted October 30, 2020 2 minutes ago, comment said: Yes, it should - provided you are on a layout of the MEMBER table and you have a found set of more than one record when you populate the variable. Ah ok maybe that's where my problem is, I am not in the layout of the MEMBER table, I am in the TRAINING table. The TRAINING table as a relationship to CONTACTS table, and the CONTACTS table as relationship to the MEMBER table. The found set is In the TRAINING table, this pulls data from the CONTACTS table (email address, name), the script then emails the found set of email addresses. Link to post Share on other sites
comment 1,777 Posted October 30, 2020 Share Posted October 30, 2020 A summary field defined in a related table will return the aggregate of the related set. if you are not on a layout of the MEMBER table, then you are setting the variable to the ID of the member that is related to the current record. Either define the summary field in the TRAINING table or do GTRR [ Match all records in the current found set ] to move your found set to the MEMBER table. Link to post Share on other sites
Chrism 0 Posted November 1, 2020 Author Share Posted November 1, 2020 ok brilliant sorted, did the GTRR option, works a treat. thanks Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now