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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble converting number into text 1

Status
Not open for further replies.

mvalley

Technical User
Mar 4, 2011
80
US
Try to create a formula to turn numbers into text.I need to display the description for what the number stands for.Example below:

If{case_record_non_supply.crns_bill_code}=840181 then "OR Minor" else if{case_record_non_supply.crns_bill_code}=1040005 then "PACU"

when I try to save formula I get the error message "A String is required here" where the 840181 number is. Suggestions on how I can get this to work??
 
you can test the field to ensure it is a numeric value and then convert it to numeric using a formula similar to below.
//{@checkanddisplay}
IF isnumeric({table.field})=TRUE then
(
IF tonumber({Table.field})=840181 then "OR Minor" else
(
IF tonumber({table.field})=1040005 then "PACU"
))

 
alternately, you could put quotes around the 'numbers' that are really stored as strings.


//{@yourformulamodified}
If{case_record_non_supply.crns_bill_code}="840181" then "OR Minor" else if{case_record_non_supply.crns_bill_code}="1040005" then "PACU
 
Thank you. I had a lot of other numbers to text to add so I chose option #2. Works great. Thanks for helping me with this formula
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top