• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 315
  • Last Modified:

How do I add sorted contacts to a group

Software: Filemaker 9 + Filemaker - Email Campaign Management.fp7


with the current solution I have to add every single contact individual to a group. is there a possibility to add a sorted list of contact with one step to a group to send campaign to that group?

best regards

1 Solution
Within the template itself - no, there is no way to do this. You can modify a couple layouts, and add a script to allow you to do this. Try the following:

1. Open the solution, go into Define Database, select the table "Contacts" and create a new field and call it gGroupID_temp. You will make this a global number field. This field is going to remember the group ID that every contact in the found set will be added to.

2. In the GROUPS layout, go into layout mode and plop the GroupID field onto the layout. (this is so you can see it to be able to enter it later on). Find your group, and make a note of the group ID you want to add the contacts to.

3. Create a new Script called "Add Contacts To Group". You will call this from within the Contact List layout(add button on this layout). (Natually you have already found all the contacts to be added to the same group before running the script). The script is going to look like this:

SHOW CUSTOM DIALOG ["Enter Group ID to assign found set to",input field is "gGroupID_temp"]
SET VARIABLE $$theGroupID, gGroupID_temp
  SET VARIABLE [$$theContactID; the value;"ContactID"]
  GO TO LAYOUT [GroupsContacts_Utility]
  SET FIELD [Groups_GroupContact::contactID, $$theContactID]
  SET FIELD [Groups_GroupContact::groupID, $$theGroupID]
  GO TO LAYOUT (list view contacts)
  GO TO RECORD [next, exit after last]

When you run the script, you will be prompted to enter the GROUP ID number for the group you want to add everyone to. It will loop thru all the contacts, and for each one in the found set it's going to create the matching "join" record in the Groups_GroupContact table.

A wee bit o' hassle, but I am sure you are up to it.

casablancahhAuthor Commented:
Thank you very much.... it works :-)

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now