1 Reply Latest reply on Mar 13, 2016 7:09 PM by macwombat

    Data type conflicts for enumerated checkbox values in a number field?

    tkessler45

      I have a table that associates an index number with a text name for each record. I have created a value list for the index numbers, and have this value list show the text names for easier reading. When using this value list, I can choose the option for a checkbox set, which shows a series of the value list's text names and subsequently stores the numerical values of the checked boxes in a return-delimited list.

       

      With this setup, FileMaker allows me to define a number field in a table, and then in a layout use this value list checkbox approach for assigning values; however, the return-delimited text is stored. This is clearly not a numerical value, so I am wondering whether this is a bug, or something that may cause problems? When I access the field's data in other layouts, the data is properly translated to the appropriate checkbox values which suggests proper handling, but the same happens when I use "text" as the data type for the field. Is the data just being dynamically translated to text even though the field is a number?

        • 1. Re: Data type conflicts for enumerated checkbox values in a number field?
          macwombat

          FileMaker will sometimes let you store data in a field even though the data does not fit the field definition.  The return delimited data as you have seen can be stored in a field that is defined as a number.  However it will not correctly handle that data.  Say for instance you have a record with the checkboxes 2, 3, 4 & 5 checked.  It will consider that data as one number "2,345" ie. two thousand, three hundred and forty five.  In an edit box it would display such data as if it was return delimited:

          2

          3

          4

          5

          This data ought to be in a text field not a number field.  Similarly, it is possible to enter numbers into text fields, but they will not sort correctly as they would if they were entered in number fields:  About choosing a field type

           

          It is up to the developer to set up the data entry mechanisms to ensure data integrity so that you only have number data in number fields and have text data in text fields.