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

Help with formula

Status
Not open for further replies.

grecon

Technical User
Mar 8, 2007
78
0
0
US
I have a report that shows source codes, but the source comes out as a number (because that is the way the program stores it) and I would like to turn it into a word. In other words source code 1 is Phone, 2 is Mail, 3 is Pick up and so on. I need a formula to do this but not sure how I should write it, I was thinking something like

If {ORDERHDR.ORDER_SRC}is ["1"] then "Phone"

but I am unsure how to add all the other source codes. Any ideas?

Thanks
 
I got it to work with if I do just one source code

If {ORDERHDR.ORDER_SRC}= 1 THEN "Phone"

how do I add the rest of the source codes?
 
You can use a series of if... then statements in the formula, or the Select Case control structure, something like:

select {ORDERHDR.ORDER_SRC}
case 1: "Phone"
case 2: "Mail"
case 3: "Pick up"
default: "Other"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top