Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula for Radio Button, Combo Box, etc

Status
Not open for further replies.

flashes24

IS-IT--Management
Oct 26, 2004
31
US
I am trying to make a formula in Lotus Designer for an end user to choose 0, 2, 4, or 6. When they click on the button another text box computes this value multiplied by 10. I can't make it work I keep getting "ERROR: Incorrect data type for operator or @function: Number expected.

Or answer this question: How do you change the value of a Radio Button, Combo Box, etc to a number value?
Thanks,
 
You're mixing text and number variables in your code.

The output from a radio button is text so you need to conver the text to a number by using @TextToNumber(FieldName)

So, your computed (number) field default value would be:

@If(RadioButtonFieldName="";0;@TextToNumber(RadioButtonFieldName) * 10)

This way you are generating a number output for a number field.

The first part of the @If statement above just ensures you don't get an error in your number field if the radio button value is nul

If you want the number field to re-calculate every time the radio button value changes then make sure you select the "Refresh fields on keyword change" in the properties for you radio button field.

Hope this helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top