October 29, 20205 yr 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
October 29, 20205 yr Well, do some debugging and check what is in the $memberID_list variable at each step.
October 29, 20205 yr Author 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
October 30, 20205 yr Author 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, 20205 yr by Chrism
October 30, 20205 yr 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.
October 30, 20205 yr Author 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.
October 30, 20205 yr 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.
Create an account or sign in to comment