How do I add sorted contacts to a group

Posted on 2009-02-23
Last Modified: 2012-06-21
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

Question by:casablancahh
    LVL 10

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


    Author Closing Comment

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

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
    Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now