3 Replies Latest reply on May 3, 2011 9:31 AM by philmodjunk

    Checkbox sets

    simx48

      Title

      Checkbox sets

      Post

      I have a field with 8 different values in the value list using the checkbox set control style.  I'm wondering if there is a way to have the checkboxes automatically check off the appropriate values when I import my data from an excel file.  I have about 3,000 different records so it would be a hassle to go through each individual record and check the appropriate boxes manually.  I'm new to FMP so any help would be appreciated.

        • 1. Re: Checkbox sets
          LaRetta_1

          How would the values for each record be determined?  Checkbox is only a tool for entering regular data in a field. 

          You can set the field as an auto-enter Data if the value is the same for all records.  If all records have a different checkbox value depending upon values in other fields in same record then you can use auto-enter by calculation.

          Then during import, be sure to specify 'perform auto-enter' when asked.  Once the data is in FM, you can use Replace Field Contents[] to set the checkbox values through a set of records.  If you explain more about the values, we could be more specific.

          • 2. Re: Checkbox sets
            james.gould

            I'm not sure on the exact technique, and some of it may depend on the format of the data imported into the system - the 8 checkboxes you have in your Filemaker solution are all in one field, if these are 8 separate yes/no fields in your existing data - you will have to perform some data manipulation in order to get all the information you need into one field.

            You should be able to use a script or a calculation field and a self-joining lookup to fill the checkboxes as desired. As a starting point I would recommend creating a temporary layout that you can use to show how the data needs to be formatted. If your checkbox set controls Table::field1 - I would put two large areas for Table::field1 onto the same layout. The first should be formatted to the checkboxes as desired, the second should be formatted as text. Once you've done this click some of the checkboxes in/out and see what Filemaker puts into the edit box formatted as plain text as you select/deselect each option. If you can format your data to match what Filemaker is doing here (i.e. a list of words) you should be able to automatically fill the desired checkboxes.

            • 3. Re: Checkbox sets
              philmodjunk

              You may find it helpful to take the checkbox group field and make a copy of it on a layout, then convert one of the two copies of the field back into an Edit Box format. Now return to browse mode and click different checkboxes. The Edit box formatted copy will then show you what data is actually entered into this field.

              You'll find that each selected value is entered into the field, separated by returns. The order the boxes were clicked determines the order of the values actually stored in the field.

              You'll need to then start from the format of your data in your imported data and find a way to reproduce that list of values separated by returns so that they display as selected check boxes in your checkbox group.