7 Replies Latest reply on Jan 2, 2014 11:00 AM by philmodjunk

    Script to compile Checked check boxes

    ShivGos

      Title

      Script to compile Checked check boxes

      Post

           In my layout Patient Info, I have a field called Limb Onset and it has option to check the check boxes of various the limbs  (i.e finger, hand, leg, arm, etc) that the patient started having symptoms with. I want to write a script that will find (compile) the limbs that are checked in the limb onset field for my database of patients. How do I do that? So far I have:
           Enter Find Mode []
           Go to Layout ["Patient Info::First onset symptom;Patient Info::Limb of onset]
           Perform Find[]
           Sort Records [Restore; No dialog]

        • 1. Re: Script to compile Checked check boxes
          philmodjunk

               When you say "compile the limbs" what exact results do you want to see? What will the resulting report look like?

          • 2. Re: Script to compile Checked check boxes
            ShivGos

                 I want to try to find a pattern and see how the limb onset affects patient over time. 
                 I already have a database where each patient's limb onsets are checked from a list of check boxes of all the limbs. I just want to see a list of the ones that are checked for the results.

            • 3. Re: Script to compile Checked check boxes
              philmodjunk

                   But how do you want that "list" to look on your screen?

                   Is this a list of what was selected for a single client or is this a summary report listing data from multiple clients?

                   Do you want to see how many clients have, for example, the right arm selected, how many have the left arm selected, how many the right leg...?

              • 4. Re: Script to compile Checked check boxes
                ShivGos

                     Yes, I want to see how many clients have, for example, the right arm selected, how many have the left arm selected, how many the right leg, etc. Thank you.

                • 5. Re: Script to compile Checked check boxes
                  philmodjunk

                       That will take some work to set up. Do you have a different field with a single check box for each body part or a single field with multiple checkboxes--one check box for each body part?

                       The simplest way to get this report is to set up a system where selecting a body part generates a related record linked to the current client. That allows you to set up a fairly simple report based on this related table that can list each selected body part and the number of related records with that part selected.

                       But neither individual fields with single check boxes nor a single field with many checkboxes is set up to support that. You'd need to add that capability to your system.

                       It's also possible to get what you want from your current design using a bunch of calculation and summary fields so you may want to use that approach as the immediate fix and then figure out how to use the table of related records as a better "long term" fix for this problem.

                  • 6. Re: Script to compile Checked check boxes
                    ShivGos

                         If you could just show me how to create a script to find just one limb such as the arm check box checked, then I could work from there. Image Ive attached is what it looks like. And thank you I will do as you advised.

                    • 7. Re: Script to compile Checked check boxes
                      philmodjunk

                           Without at least some answers to my questions, all I can do is point you to this thread of scripted find examples:

                      Scripted Find Examples

                           But please also check out this tutorial for summary reports: Creating Filemaker Pro summary reports--Tutorial

                           This is the method that I think that you should use, but it will require a redesign of your database to make happen.