3 Replies Latest reply on Mar 3, 2011 9:08 AM by philmodjunk




      descriptive & technical selection values translation?


      Being an old Lotus Notes hand, I am used to have capabilities to automatically translate values of a selection field between a user-ready, descriptive value and a technical value suitable for evaluation in the database.

      An example: for a radio button, I want to display "yes" and "no", but store TRUE and FALSE values.

      In Notes, it's as easy as defining the values like



      when defining the field.

      Is there any similar mechanism in FileMaker? Or, is there another way of implementing this?

      Let me point out that my target platform is the web via IWP, so any on enter/exit scripts are out of the question.

      (I already searched the manuals, help, the forum and the Knowledge Base, to no avail)

      Thanks for your help

      yours truly


        • 1. Re: descriptive & technical selection values translation?

          Three options:

          Option 1:

          If your radio buttons will be listed in a single column of values, you can resize the field so that only the circle portion of the radio buttons are visible. Then you can use layout text to add "yes" and "no" while the radio button's value list specifies 1 and 0. This may require extensive testing in IWP to make sure that this works with all browsers. You may also be able to hide the 1 and 0 values by making the text color match the background.

          Option 2:

          Use one field for the interface and a second field for the boolean values. The second field can be a calculation field such as:

          RadiobuttonField = "Yes"

          Use the radiobuttonfield for data entry, use the calculation field when you need "True" or "False".

          Option 3:

          Use a check box field instead of a radio button field and set it to enter a 1 when selected. Like Option 1, the 1 can be hidden from view on the layout be resizing the field or by changing the text color. Clicking the box enters 1 ( True ). Clearing the check box leaves the field empty (False). You can also assign an Auto-enter calculation to this field that enters 0 (False) when the field is empty if you want.

          Personally, I just use the expression: RadioButtonField = "Yes" whenever I need the True or False values in a calculation instead of going to such lengths just to get True or False actually entered into a field.

          • 2. Re: descriptive & technical selection values translation?

            Hello Phil


            Apparently the forum eats the screenshots etc. Too bad. Or send me a mail to send a screen capture...

            Thanks for your extensive answer. Maybe I shouldn't have simplified my issue as much as I had - the radio buttons are not binary but have multiple selections.

            There are two special scenarios that I'd like to look at:

            - my client likes to have the labels to the left of the selector. FM offers them to the right only. That led him to implement Option 1 for the FM client forms. When you "cut off" the value displays, that does not work in IWP. See below, so I need another solution. I already tried to reduce font size and to hide the labels by displaying them as white on white. That works, but that does not prevent them from atually using space in the HTML rendition.

            - The client has a series of yes/no questions to be answered; he opted to put them in a table with the columns being question, yes, no. Again, hiding the yes/no labels is futile, you can correct to some degree by using miniscule font sizes. However, once you make the radio button too small, it omits the no checkbox.

            Let me go through the options you presented above:

            Option 1 does not work with IWP:

            What in Layout mode looks like this ... ... is rendered like this on IWP:

            specified: 6 answers

            displayed: 4 answers3

            As for horizontal radio buttons, the result is:

            Naturally, the "nein" column originally held the no radio buttons.

            Option 2 might work. Will this field be stored in the database, too? -- I'll try and see.

            Option 3: the problem with that is that Iuse it on IWP - reading the doc, I assumed that I cannot attach any entry/change/exit scripts. Is that correct?

            Yours truly


            • 3. Re: descriptive & technical selection values translation?

              In FileMaker, it's often easier to just use option 4: "Use the expression: RadioButtonField = "Yes" whenever I need the True or False values in a calculation instead of going to such lengths just to get True or False actually entered into a field."

              If not, option 2 should work for you in all cases, yes the calculation field would be defined in the same table.

              Option 3 does not require script triggers, so it should work equally well in IWP--but it does assume a binary set of values.

              If all else fails, you can place buttons on your layout for selecting and setting the boolean values in your fields.

              Apparently the forum eats the screenshots etc

              Screenshots can be uploaded to your original post and you can click the edit button to add them after the original post--not what you want here, but that's the simplest way to do this. In subsequent posts, you have to upload the screenshot to a file sharing site and then you use the link to it here to insert the image.