6 Replies Latest reply on Feb 13, 2013 9:42 AM by LesliePatrick

    Creating on-screen button to select multiple items

    LesliePatrick

      Title

      Creating on-screen button to select multiple items

      Post

           Hi all,

           New to forums so not sure of correct format.  Please help!!

           Can a 5 x 5 button array be set up, in a form layout, to look and act like a checkbox i.e on mouse click the selected button colour would change and remain the altered colour with the button adding an input value into a table field?

           Also if  the button was mouse clicked again it the button would revert to the dafault colour.

           Can anyone help me with both the button operation and script required to input a value into the selected field?

           Thanks

           Les Patrick

        • 1. Re: Creating on-screen button to select multiple items
          philmodjunk

               Yes, this can be done, but since you are mimicking the behavior of a set of check boxes, why not just use check boxes instead of buttons?

          • 2. Re: Creating on-screen button to select multiple items
            LesliePatrick

                 PhilModJunk,

                 I have a checkbox set-up already but would prefer to have a single word recorded in the value field, rather than having each word selected being recorded in the value field.  If there is a way of separating the word in a value field then the checkbox would be an option but I don't know how to write the necessary script.

            • 3. Re: Creating on-screen button to select multiple items
              philmodjunk

                   Can you explain what you are trying to do in more detail?

                   That description doesn't seem to make sense. A check box interface normally implies that the user may select multiple values. If the user is only permitted to select a single value from the list, a radio button format makes more sense.

              • 4. Re: Creating on-screen button to select multiple items
                LesliePatrick

                     Ok,

                     I Know little or nothing about databases. I am trying to match an employee who may have multiple skills with a job enquiry.  I have the employees personal information recorded within the database and I am now looking to record individual skill sets (some may have a single skill while others have different multiple skills).  I would then like the skills information to be checked against the skills requested on the job enquiry to see if any of the employees match those skills.

                     The checkbox meets the recording needs, but I don't know how to write the script to use the information held within the value field, i.e how to interrogate the information held within the value field holding the employee skills and the requested skill asked for in the job enquiry.

                     Hope this makes more sense

                • 5. Re: Creating on-screen button to select multiple items
                  philmodjunk

                       That one's right on the balance point between buttons controlling records in a join table and using a single checkbox formatted field for listing skills. I'd probably use the first option, but the second is easier to implement--it's just harder to work with for some types of reporting and can be less flexible when working with very different size lists of skill sets.

                       To check to see if a value is selected in a checkbox field, Not Isempty ( Filtervalues ( YourTable::YourCheckboxField ; "Value" ) ), will return True if "Value" is selected in the check box field.

                       In a relationship:

                       Applicant::SkillsetCheckBoxField = Position::SkillSetCheckBoxField

                       will form a valid relationhip link if any one value selected in the first check box field is also selected in the check box field in Position.

                       But a relationship like this:

                       Applicant::__pkApplicantID = Skills::_fkApplicantID

                       is more flexible.

                       A portal to Skills on your Applicant layout can be used to list all skills selected for that applicant.

                       Or you can use your button idea to create/delete records in that Skills table with conditional formatting on the buttons used to show which skills are and are not selected. This conditional formatting can actually make your buttons look and function exactly like check boxes.

                       See the Checkboxes layout in this demo file: https://www.dropbox.com/s/oyir7cs0yxmbn6i/ManyToManywDemoWExtras.fp7

                       If you are using FileMaker 12, open this file from the File menu to produce a copy that is formatted to the FilelMaker 12 file format.

                  • 6. Re: Creating on-screen button to select multiple items
                    LesliePatrick

                         Thanks PhilModJunk,

                         I think it will take me a while to sift my way through all the data.  Great response, thanks again.