4 Replies Latest reply on Jun 17, 2014 1:50 PM by philmodjunk

    buttons for client type

    abunce515

      Title

      buttons for client type

      Post

           quick background - I am in real estate and have contacts who frequently change contact type. 

           I am wanting to have a set of buttons or something to that effect on my contact cards that show which type of client they are now.  to simplify it well focus on two types.  buying and selling.  This list will more than likely grow.  (lenders, contractors, insurance providers, etc)

           Some clients can be buyers, sellers, or both.  

           Ideally i think i would like a drop down list that lets you check all of the different types of contacts they match. but then if you open that drop down list again and uncheck one of the options it would delete the record of them being a buyer from the join table.  Buttons would work, but as i sit here and build this list I am learning i could have a lot of option.  10-20, looks good in a list, but could look terrible as just a bunch of buttons.

           can someone point me in the right direction of achieving this goal?  thank you for your time.

      Untitled.jpg

        • 1. Re: buttons for client type
          philmodjunk

               Why not a single field formatted with check boxes?

               An OnObjectModify trigger can perform a script when you select or clear a value in this set of check boxes and if a record exists in the join table but "buyer" is not a selected check box, the script can then delete that join table record if this is what you want to see happen.

               IsEmpty ( FilterValues ( CheckboxField ; "Buyer" ) )

               will be True if "Buyer" is not a selected value in the check box formatted field.

          • 2. Re: buttons for client type
            philmodjunk

                 But after taking a closer look, you don't really need both a checkbox formatted field in Contacts and a join table also. You can just stick with the check box formatted field in most cases.

            • 3. Re: buttons for client type
              abunce515

                   thanks - but at that point am I jamming a bunch of information into one field?  what do they call that, a multi value field?

                    

              • 4. Re: buttons for client type
                philmodjunk

                     Yes, it's a multi-value field and a FileMaker field can hold gargantuan amounts of text--far more than your value list with check box values will ever need to enter.

                     Whether you should use a join table or a text field with a check box group depends on how you will use this data beyond the basic data entry task described here. But you won't need both options. A Join table is more work to set up and maintain, but offers options--especially reports on layouts based on the Join table, not easily possible with a single check box group field.

                     If you decide to stick with the Join table, you might be interested in the "check box portal" layout found in this demo file: https://www.dropbox.com/s/oyir7cs0yxmbn6i/ManyToManywDemoWExtras.fp7 It has a portal to the "far side" table (such as ContactType in your case) formatted with scripted buttons so that it looks like a check box field but is really a portal with scripts that create or delete join table records as needed when you click check boxes in this portal.

                     Note: This file is in the older file format so developers with FileMaker 12 or newer will need to use Open from FileMaker's File menu to open this file and produce a copy with the new file format.