4 Replies Latest reply on Nov 14, 2011 10:39 AM by AlbertPujol

    numeric value in table but text label in form

    AlbertPujol

      Title

      numeric value in table but text label in form

      Post

       Hello everyone,

      I'm trying by all means to create a field that stores a number in the table, but always shows an assigned text label when in form view.  I've tried look up values and list values and the nearer I can get to it is that when I introduce the data, the label is shown but when selected the value it turns to the numeric value which will be stored in the table.

      I come from access school and I did that with table look up, hiding the first column, and only seeing the second in the form.

      Thnks for the help.

        • 1. Re: numeric value in table but text label in form
          AlbertPujol

           I'll try to explain my doubt better:

          - I use my databases to collect data so that I can later analyse them in the SPSS software.

          - I need the data in the tables to be numbers so that spss can easyly import and work with them (be it categories or continuous variables).

          - However, when collecting data in the forms I want not the numbers to be displayed but a label (E.g: Sex: 0 is Female, 1 is Male)

          - I'd like to see ALWAYS the label (female/male) in the forms view, but have the data in the tables stored as 0/1.

          Thanks a lot, again. 

          • 2. Re: numeric value in table but text label in form
            mgores

            You can have 2 fields, one the number field you want and the other a text field for what you want displayed.  Set up the number field to be an autoentered calculation based on what you select in the text field

            eg  Case (SEXtext = "MALE";1;0)   Should enter 1 if sex is Male or 0 if it is Female.

            • 3. Re: numeric value in table but text label in form
              philmodjunk

              I come from access school and I did that with table look up, hiding the first column, and only seeing the second in the form.

              In FileMaker, this can easily be done with a pop up menu, but if you prefer a drop down list, it takes a bit of sleight of hand. In the value list set up for your pop up menu or drop down list you can specify that the first field be hidden. In a pop up menu, that's all you need to do. In a drop down list, the selected number will appear when you exit the field. You can hide this number in one of two ways:

              1) Select the arrow option for the drop down list and then resize the field until only the arrow icon is visible. Place the "name" field you used as field 2 in your value list from the related table next to this field to show the selected name.

              2) Place a copy of this same "name" field on top of the drop down list field and use the behavior settings in the Inspector to deny access to this field while in browse mode. Now, when you click on this name field, the drop down list behind it pops to the front and deploys the value list. When you exit the field, it disappears back behind the name field.

              • 4. Re: numeric value in table but text label in form
                AlbertPujol

                Thanks for your help.