Radio button question

Radio button question

Post by Tony Ferrin » Sat, 05 Jul 2003 06:45:45



In my FMP (5.0v1) database I want to have a radio button to allow the
input of 3 mutually exclusive choices like shown below:
  _           _           _
( ) Choice1 (.) Choice2 ( ) Choice3

Now, when a user makes a selection I don't want to store the text
corresponding to the choices description in each record as that will be
just a waste of space and make searches and calculations not so easy.
Hence, in my database I have just one numeric field, say Choice_ID that
is mapped to a small file containing also a field called Choice_ID and
another with the corresponding the description, e.g.

"main_database.fp5"          "choice_desc.fp5"
        +-----------+          +-----------+---------------------+
.......| Choice_ID |  ----->  | Choice_ID | Choice_description  |
        +-----------+          +-----------+---------------------+

Now in my main database I create a field, format it to be radio button
and specify the value list to be in "choice_desc.fp5". It works fine (as
explained above) but it displays also the numeric value, which is
irrelevant for the user. This is, what I get is:
  _             _             _
( ) 1 Choice1 (.) 2 Choice2 ( ) 3 Choice3
    ^^^           ^^^           ^^^

^^^ = Irrelevant information for the user

My question is:
Is it possible to tell FMP not to print the numeric field on the radio
button?

Thanks.

Tony F.

 
 
 

Radio button question

Post by John Weinshe » Sat, 05 Jul 2003 13:46:04


I'm not quite sure why you've added choice_desc.fp5 (unless it serves other
purposes as well). If I'm following, you just want to map an alpha choice to
numeric values. If so, why not simply use a Case() statement, i.e.,:

Case(Choice_ID = Choice1, 1,
         Choice_ID = Choice2, 2,
         Choice_ID = Choice3, 3
         )

..., or some similar scheme? Any reason you can't hard-code the value list?

FMP will print, to answer your question, whatever the field is formatted to
print. It's common practice to use a different layout for printing than for
data input, and that layout can display the field without its radio button.

--
John Weinshel
Datagrace
Vashon Island, WA
(206) 463-1634
Associate Member, Filemaker Solutions Alliance


Quote:> In my FMP (5.0v1) database I want to have a radio button to allow the
> input of 3 mutually exclusive choices like shown below:
>   _           _           _
> ( ) Choice1 (.) Choice2 ( ) Choice3

> Now, when a user makes a selection I don't want to store the text
> corresponding to the choices description in each record as that will be
> just a waste of space and make searches and calculations not so easy.
> Hence, in my database I have just one numeric field, say Choice_ID that
> is mapped to a small file containing also a field called Choice_ID and
> another with the corresponding the description, e.g.

> "main_database.fp5"          "choice_desc.fp5"
>         +-----------+          +-----------+---------------------+
> .......| Choice_ID |  ----->  | Choice_ID | Choice_description  |
>         +-----------+          +-----------+---------------------+

> Now in my main database I create a field, format it to be radio button
> and specify the value list to be in "choice_desc.fp5". It works fine (as
> explained above) but it displays also the numeric value, which is
> irrelevant for the user. This is, what I get is:
>   _             _             _
> ( ) 1 Choice1 (.) 2 Choice2 ( ) 3 Choice3
>     ^^^           ^^^           ^^^

> ^^^ = Irrelevant information for the user

> My question is:
> Is it possible to tell FMP not to print the numeric field on the radio
> button?

> Thanks.

> Tony F.


 
 
 

Radio button question

Post by Rien » Sat, 05 Jul 2003 17:23:17


Maybe a too simplistic solution, but which works fine, is to put textboxes
over de buttons which contains the text you want the user to see. Make the
fieldtext invisible (same color as background or make it vanish under the
textboxes.).
The user thinks to press his text, but the field is set as you like it.
No relational db needed, unless you need it for other purposes.

Hope I understood your problem correctly

Rienk



Quote:> In my FMP (5.0v1) database I want to have a radio button to allow the
> input of 3 mutually exclusive choices like shown below:
>   _           _           _
> ( ) Choice1 (.) Choice2 ( ) Choice3

> Now, when a user makes a selection I don't want to store the text
> corresponding to the choices description in each record as that will be
> just a waste of space and make searches and calculations not so easy.
> Hence, in my database I have just one numeric field, say Choice_ID that
> is mapped to a small file containing also a field called Choice_ID and
> another with the corresponding the description, e.g.

> "main_database.fp5"          "choice_desc.fp5"
>         +-----------+          +-----------+---------------------+
> .......| Choice_ID |  ----->  | Choice_ID | Choice_description  |
>         +-----------+          +-----------+---------------------+

> Now in my main database I create a field, format it to be radio button
> and specify the value list to be in "choice_desc.fp5". It works fine (as
> explained above) but it displays also the numeric value, which is
> irrelevant for the user. This is, what I get is:
>   _             _             _
> ( ) 1 Choice1 (.) 2 Choice2 ( ) 3 Choice3
>     ^^^           ^^^           ^^^

> ^^^ = Irrelevant information for the user

> My question is:
> Is it possible to tell FMP not to print the numeric field on the radio
> button?

> Thanks.

> Tony F.

 
 
 

Radio button question

Post by Tony Ferrin » Sun, 06 Jul 2003 05:36:30



> I'm not quite sure why you've added choice_desc.fp5 (unless it serves other
> purposes as well). If I'm following, you just want to map an alpha choice to
> numeric values. If so, why not simply use a Case() statement, i.e.,:

> Case(Choice_ID = Choice1, 1,
>          Choice_ID = Choice2, 2,
>          Choice_ID = Choice3, 3
>          )

> ..., or some similar scheme? Any reason you can't hard-code the value list?

This will not work because Choice_ID is a field of type Number (not a
calculation field) which contains either 1, 2 or 3 while Choice1,
Choice2 and Choice3 are text constants used only for labelling the radio
buttons. So we cannot compare numbers with text (please correct me if
I'm wrong). The only thing I want to store are those numbers, the only
thing I want the user to see are those text labels (not the stored numbers).

Quote:> FMP will print, to answer your question, whatever the field is formatted to
> print. It's common practice to use a different layout for printing than for
> data input, and that layout can display the field without its radio button.

Yes, I know that. Maybe I was not clear, I meant printing *on the
screen* for user interaction.

Tony F.

 
 
 

Radio button question

Post by Tony Ferrin » Sun, 06 Jul 2003 05:37:01



> Maybe a too simplistic solution, but which works fine, is to put textboxes
> over de buttons which contains the text you want the user to see. Make the
> fieldtext invisible (same color as background or make it vanish under the
> textboxes.).
> The user thinks to press his text, but the field is set as you like it.
> No relational db needed, unless you need it for other purposes.

Yes, I did try that before posting this question.

Though not an elegant solution, I did make the font colour equal to the
radio button background colour and put 3 textboxes to label the radio
buttons field.

Afterwards, I went to browse mode but when I clicked on the field the
textboxes disappeared "underneath" resulting in the radio button having
no labels. Maybe it is possible to change this behaviour but I could
find how to do it.

Tony F.

 
 
 

Radio button question

Post by Henk » Sun, 06 Jul 2003 05:44:06




> > Maybe a too simplistic solution, but which works fine, is to put textboxes
> > over de buttons which contains the text you want the user to see. Make the
> > fieldtext invisible (same color as background or make it vanish under the
> > textboxes.).
> > The user thinks to press his text, but the field is set as you like it.
> > No relational db needed, unless you need it for other purposes.

> Yes, I did try that before posting this question.

> Though not an elegant solution, I did make the font colour equal to the
> radio button background colour and put 3 textboxes to label the radio
> buttons field.

> Afterwards, I went to browse mode but when I clicked on the field the
> textboxes disappeared "underneath" resulting in the radio button having
> no labels. Maybe it is possible to change this behaviour but I could
> find how to do it.

> Tony F.

Make the width of the radio button field so small that it only shows the
rounds. Place text on the side of it.
If your solution must be cross-platform, then check the placement of the
buttons/texts on both platforms.
--
Henk B
 
 
 

Radio button question

Post by Tony Ferrin » Sun, 06 Jul 2003 06:04:48



> Make the width of the radio button field so small that it only shows the
> rounds. Place text on the side of it.
> If your solution must be cross-platform, then check the placement of the
> buttons/texts on both platforms.

Yes, that works if the radio buttons are on a vertical line but if they
are on a horizontal line, e.g. :
  _        _          _
( ) Left (.) Centre ( ) Right

then that trick does not seem to work (if you shrink the radio button
field only the leftmost button will be visible).

Tony F.

 
 
 

Radio button question

Post by LaRett » Sun, 06 Jul 2003 14:23:21


Hi Tony,

If you want to resize those pesky radio buttons - have them horizontal
but further apart, and still 'not' display the label, you can do so.
The following will allow you room to place your text:

Create a Value List for each selection in the radio button.  VL with
'1',  VL with '2' etc.

Place your real radio button field on the form in three places.  Resize
the radio so only the radio displays.  Copy it twice more.  Attach the
new Value Lists - VL1 to the first field, VL2 to second and VL3 to third
as radios.

Now you can place them anywhere but they fill the same field.  Also
works with checkboxes.   BTW, VL's take very little FM resources. :)

I had to place M/F checkboxes on a pre-printed government form (Medicaid
HCFA1500) and spread them apart but not show the labels.  This works
very well.

LaRetta

--
Posted via http://dbforums.com

 
 
 

Radio button question

Post by Tony Ferrin » Sun, 06 Jul 2003 23:00:28



> Hi Tony,

> If you want to resize those pesky radio buttons - have them horizontal
> but further apart, and still 'not' display the label, you can do so.
> The following will allow you room to place your text:

> Create a Value List for each selection in the radio button.  VL with
> '1',  VL with '2' etc.

> Place your real radio button field on the form in three places.  Resize
> the radio so only the radio displays.  Copy it twice more.  Attach the
> new Value Lists - VL1 to the first field, VL2 to second and VL3 to third
> as radios.

> Now you can place them anywhere but they fill the same field.  Also
> works with checkboxes.   BTW, VL's take very little FM resources. :)

> I had to place M/F checkboxes on a pre-printed government form (Medicaid
> HCFA1500) and spread them apart but not show the labels.  This works
> very well.

Hi LaRetta,

Thanks a lot for your suggestion. It now works as I wanted.

Tony F.