5 Replies Latest reply on Sep 14, 2011 8:27 AM by philmodjunk

    Checkbox Problem

    Scruff

      Title

      Checkbox Problem

      Post

      I have a field set up with checkboxes and data entry is fine..  When I look at the data in the table, there is a question mark in the field, and when I click on it, there are several numbers stored horizontally in the field and they accurately correspond to numerical values that were entered via the checkbox. 

      When I try to retrieve the values however, all I get is the last value in the field.  The previous values are not retrieved.

      I'm obviously missing something simle here.  There's no way you can enter multiple values but retireve only a singular one.

        • 1. Re: Checkbox Problem
          philmodjunk

          A question mark is FileMaker's way of saying "I can't display all the data in this number field...". That could be due to a calculation error such as divide by zero or, as in this case, data that can't be displayed as a single number or simply due to the field being too small to display all the data.

          Since this field is using checkboxes to store a list of values, it should be a text field, not a number field. That will make it easier to see the contents of the field on a layout that doesn't use check box formatting on the field and it will make it easier to manipulate the data stored in the field's list.

          When I try to retrieve the values however, all I get is the last value in the field

          How did you try to do that?

          With a check box formatted field, multiple values are stored in the field separated by return characters. There are functions you can use to examine the data stored in this field, but I need to know exactly what you want to do with the list of numbers in order to show you how to do what you want.

          • 2. Re: Checkbox Problem
            Scruff

            To cut to the chase, what I have is a layout with three fields.

            The first field is a linked field, linked to a table that contains "invoices"  This is a drop down box that I can pull the number down from the invoice table.

            The second field is a serial number field that gives each entrance a unique value in the three field table (orders)

            The third field is the check box field where a user can select the values.

            Essentially what I would like is for each entry to have a unique serial number, the order it is tied to, and a numerical identifier from the checkbox input.

            If for example, there are three selections made from invoice #34, and those products are identified as 72, 83 & 34, I'd like the data in the table to stored as

            ID    Invoice   Order

            2        42          72

            3        42          83

            4        42          34

            I had it working last Friday, then started tinkering and screwed up the whole mess.

            • 3. Re: Checkbox Problem
              philmodjunk

              Use a related table (we call this a line items table) to record the individual items selected for a given invoice. This is much more flexible for managing your invoice, and when printing reports.

              Here's a simple demo file created by Comment that illustrates this approach: http://fmforums.com/forum/showpost.php?post/309136/

              • 4. Re: Checkbox Problem
                Scruff

                Interesting.

                I guess getting back to the original problem fo the checkbox, I'm wondering if it's unworkable.

                If I use a checkbox for entry, how can I get access to all of the data in the blank. The data is stored without delimiters, just line after line in each blank. Right now, if I include the field the checkbox data is stored in, the only number stored in the blank is the last one in the set.  In other words, if, when I click on the field in table view, I show:

                42

                73

                84

                Which corresponds to what I clicked on in the checkbox field.  But when I include that field for printing, all that shows up is "84". There must be a way to get to all this data to display it in a report form.  Why choose specific method of input if you can't get to the data?

                • 5. Re: Checkbox Problem
                  philmodjunk

                  It's not unworkable, just very inflexible and creates problems best avoided in most invoicing solutions. I am suggesting that you not use a check box group for selecting items on a given invoice like this but to use separate line item records in a portal where you select products to be listed on the invoice from a drop down list or pop up menu inside the portal row.