10 Replies Latest reply on Jul 23, 2016 12:06 AM by philmodjunk

    Checkbox field and statistics


      I was considering use of a checkbox field to indicate whether a 'patient' had zero, one or more conditions. I will wanting to analyse % of those conditions for a patient group probably in Excel or a stats package. I'm beginning to suspect I'll actually need a related table with a separate field for each condition.


      Has anyone used a 'checkbox' style method of indicating condition then gone on to analyze statistically? Advice appreciated.

        • 1. Re: Checkbox field and statistics

          checkboxes are convenient, however you've found extracting the 'counts' is not so easy.

          A related table with separate fields does not sound like a good alternative. The number of fields could be variable.


          It might be better to have a related table with one field that can have many related records. Then use a value list on the field to 'set' each condition. A relationship with "allow creation" would let you quickly select the value for each new record.


          Or keep the checkboxes (in the parent record) and use queries to extract the counts of the values. Search this forum for ways others have used. ExecuteSQL(), multiline keys to the values, etc.



          • 2. Re: Checkbox field and statistics

            It is also possible to set up a portal that looks and acts like a check box set only now you can have a scroll bar if you want.

            The advantage for you is the same as Beverley has suggested. With the data recorded in separate related records, collecting and computing statistics becomes quite straight-forward.

            • 3. Re: Checkbox field and statistics

              phil, are you suggesting pre-creating the sets of related records that can be checked/unchecked?


              I have done this sort of thing with surveys/form questions. The questions are the related "set" of records that are created for each "survey/form" (as needed). Then the user simply checks the responses/answers. If the list is long, rather than a portal, I use GTRR (go to related records) and show some parent info in the header, but the questions are in List View. Still a scroll, but not a portal and easier to review the form (especially for printing).



              • 4. Re: Checkbox field and statistics

                It's a bit more sophisticated than that. You use one master table of "Value name" records to pull up in the portal and then a related table of associated "Value records" that show whether a particular value was selected for a given layout record. Typically, I use a global field in the portal's table to set up a "reach thru" relationship to associate specific value records to the current layout table record. A basic outline of the relationship would look like this:




                LayoutTable::AnyField X ValueLabels::AnyField (I've used the cartesian join to get all values, but you could link by category fields to show only subsets of the total list of value labels.)


                ValueLabels::__pkValueID = ValuesTable::_fkValueID AND

                ValueLables::gLayoutTableID = ValuesTable::_fkLayoutTableID


                An OnRecordLoad script trigger performed script sets the global field gLayoutTableID to the LayoutTableID of the current Layout table record.


                You then put a button in the portal row that creates the related ValuesTable record if one does not exist and that deletes it if it does to produce the "toggle" effect of selecting or deselecting a check box. You then use hide conditions with a check box image to create the check box "look" to go with the scripted behavior.


                If you search this forum for my "Adventures in FileMaking" files and download the one titled "Enhanced Value Selection", you'll get a demo file that includes several variations of this technique that can simulate either radio buttons or check boxes but with a scroll bar.

                • 5. Re: Checkbox field and statistics

                  That's gone over my head at the moment but I'll have a go coming back to it.


                  Re. exporting to Excel then a Stat software, both will need a flat file where each condition effectively has a field. You'll 'shoot me' and I realise it lack flexibility, but simply putting a field for each condition so that each record has a 0/1 for whether the condition exists: Would that not capture the data if as checked box = 1 fields in a Popover?

                  • 6. Re: Checkbox field and statistics

                    It does capture the data. It does make flat file export simple.


                    But it's also very inflexible.

                    • 7. Re: Checkbox field and statistics

                      Thanks. I'll try to slowly digest the more complex version. Good to hear from you by the way.


                      • 8. Re: Checkbox field and statistics

                        Here is a link to the Adventures in FileMaking File that I referred to earlier:

                        Adventure 2 EVS.fmp12


                        This is a fully functional file created a few versions ago and is extensively annotated to make it easier to understand. Since the file shows off working copies of each technique, you can read the layout text article next to a working copy that you can tear apart in order to see how it works and what happens if you make your own changes. In fact, I encourage people who download the file to make copies of it so that they can keep the original unchanged while they use copies to "play" with the concepts demonstrated.

                        • 9. Re: Checkbox field and statistics

                          Are there specific tabs on Adventures 2 EVS, re. this problem, I should visit?

                          • 10. Re: Checkbox field and statistics

                            There's a button for check boxes with scroll bars if I remember correctly the name that I gave it.


                            Sent from my iPhone