Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8760 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hello all,

I have a yes/no type of variable in FM Pro 5 that I want to use a radio button for. The trick is that I want the user to see the words 'Yes' and 'No' next to the buttons, but have FM actually store a 1 or 0 respectively if the user clicks 'Yes' or 'No'. Is this possible?

Ron

Posted

quote:

Originally posted by stewarr1:

Hello all,

I have a yes/no type of variable in FM Pro 5 that I want to use a radio button for. The trick is that I want the user to see the words 'Yes' and 'No' next to the buttons, but have FM actually store a 1 or 0 respectively if the user clicks 'Yes' or 'No'. Is this possible?

Create your value list as 1 and 0. When you put the field on the layout, size it so that only the actual buttons are shown. Then simply put "Yes" and "No" on the layout as text next to the appropriate button.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

  • Newbies
Posted

Kurt,

Thanks for the suggestion. This would work OK if the circles for the 'yes' and 'no' options are on top of one another. However, I would like it to look like this:

O Yes O No

and not like this:

O Yes

O No

When I put the field on the layout it comes out like this:

O 0 O 1

Is there a way to resize the above to get rid of the '0' and '1' and keep it horizontal?

Ron

quote:

Originally posted by captkurt:

Create your value list as 1 and 0. When you put the field on the layout, size it so that only the actual buttons are shown. Then simply put "Yes" and "No" on the layout as text next to the appropriate button.


Posted

User two fields and a couple of scripts. Have one field called Value_Yes and another field called Value_No. Each one can have a value of either 1 or empty. Place them on your layout and format the field boundaries so that the 1 from the value list is not visible, and place them on the same horizontal line. Put text to the left of each one for Yes and No.

Now create two scripts. Set_Value_To_Yes and Set_Value_To_No.

Set_Value_To_Yes has two lines:

Set Field [ Value_Yes, 1 ]

Set Field [ Value_No, "" ]

Set_Value_To_No is the reverse:

Set Field [ Value_No, 1 ]

Set Field [ Value_Yes, "" ]

Attach the scripts to the Value_Yes and Value_No fields.

Chuck

  • Newbies
Posted

Thanks Chuck, I'll give that a try.

quote:

Originally posted by Chuck:

User two fields and a couple of scripts. Have one field called Value_Yes and another field called Value_No. Each one can have a value of either 1 or empty. Place them on your layout and format the field boundaries so that the 1 from the value list is not visible, and place them on the same horizontal line. Put text to the left of each one for Yes and No.

Now create two scripts. Set_Value_To_Yes and Set_Value_To_No.

Set_Value_To_Yes has two lines:

Set Field [ Value_Yes, 1 ]

Set Field [ Value_No, "" ]

Set_Value_To_No is the reverse:

Set Field [ Value_No, 1 ]

Set Field [ Value_Yes, "" ]

Attach the scripts to the Value_Yes and Value_No fields.

Chuck

  • 4 weeks later...
  • Newbies
Posted

Why not create two value lists. One called Yes contains value 1. Second No contains value 0. Then just place your field on the layout twice with the different value lists. Hide the 1 & 0 and just place yes or no next to them.

Posted

I try to avoid the use of scripts to modify field data whenever possible.

Use the radio buttons to enter yes or no. Create a calculation field...

If(field="yes", "1", "0")

What could be simpler and more reliable than this? No fancy layout tricks needed, no tricky scripts either. Nothing to break in the future.

This topic is 8760 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.