Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script only adding to first record in found set

Featured Replies

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

 

 

Screenshot 2020-10-29 at 14.23.42.png

Well, do some debugging and check what is in the $memberID_list variable at each step.

 

"MEMBER::zz_Listof_ID" isn't a repeating field is it?

 

  • 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

Screenshot 2020-10-29 at 15.46.41.png

  • 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

 

Screenshot 2020-10-30 at 09.17.48.png

Screenshot 2020-10-30 at 09.16.23.png

Edited by Chrism

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.

 

  • 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.

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.

 

  • Author

ok brilliant sorted, did the GTRR option, works a treat. thanks

 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.