3 Replies Latest reply on Jan 14, 2015 6:04 AM by erawson

    Labelling fields

    tays01s

      Title

      Labelling fields

      Post

      I have a radio-button with values of 'a or c'. I need to keep that, but want to label the actual buttons 'Adult/ Child'. I've put a text box in place, but when I actually click the button, the 'a / c' conditional value list appears until I click out of the field. Can I keep the text box in view? [Have tried grouping it with the field but to no avail]

        • 1. Re: Labelling fields
          erawson

          Here is a possible solution using a radio button field

          Step 1: Create a new text field, lets call this field "type" for the purposes of this post

          Step 2: Place the new "type" field on your layout, set it to be a radio button field and use the Adult / Child value list.

          Step 3: Enter browse mode and make sure you are showing all records (Click Show all records in the status bar or in the Records menu)

          Step 4: Click into the "type" field and go to the Records menu and select Replace Field Contents

          Step 5: Click the "Specify.." button beside Replace with Calculated Result

          Step 6: Enter the following Calculation (oldfield is your field with a or c in it)

          Case ( oldfield = "a" ; "Adult" ; oldfield = "b" ; "Child" )

          Step 7: Change oldfield to a calculation field with the calculation

          Case( type = "Adult" ; "a" ; type = "Child" ; "c" )

          • 2. Re: Labelling fields
            tays01s

            Since I'd be using 'type' as the active field and 'oldfield' has become merely a data source, what is the rationale for step 7?

            I should have mentioned that occasionally I will be updating the contents of this table by importing from Excel, so, one solution would be to make 'type' a calculation field, using the calculation you described.

            • 3. Re: Labelling fields
              erawson

              The reason for step 7 is because if you change the value of 'type' it will also change 'oldfield' if you make it a calc. If you do it the other way around and make 'type' the calculation then you will not be able to use 'type' as a clickable radio button field in browse mode because it will be a calculation field instead of a text field, thus negating it's entire purpose.

              If you're importing data from excel, and the data is in the format of 'a' or 'c' then change your field mapping to import that into the new 'type' field (you can't import into calculation fields which your 'oldfield' is now set to). Then in your import script, right after the Import Records script step, add a Replace Field Contents for the 'type' field with the calcultion Case ( type = "a" ; "Adult" ; type = "c" ; "Child" )