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!

ISNULL and PRINTING TEXT WITH DATA

Status
Not open for further replies.

Lanie

Programmer
Jan 20, 2000
83
US
Good Morning Everyone,
We need to set up a formula to print the text "cust part" followed by the customer's part number (when there is one), but to not print the line at all if the field is blank.

We have tried to use this formula, which will print the text with the correct part number if there is one. However, if there is no part number, it still prints the text, which we don't want.

IF ISNULL ({CUSTOMER_ORDER_LINE\.CUSTOMER_PART_NO})
THEN " "
ELSE "Cust Part"&({CUSTOMER_ORDER_LINE\.CUSTOMER_PART_NO})

Any ideas to fix this?

Lanie
laniet@ij.net
etroidl@conaxfl.com


 
Your formula checks for Null values in the field are the blank values null or just blank strings ?

Try

IF ISNULL ({CUSTOMER_ORDER_LINE\.CUSTOMER_PART_NO}) THEN
""
ELSE IF Trim({CUSTOMER_ORDER_LINE\.CUSTOMER_PART_NO)) = "" THEN
""
ELSE
"Cust Part"&({CUSTOMER_ORDER_LINE\.CUSTOMER_PART_NO})

HTH

Gary Parker
Systems Support Analyst
Manchester, England
 
You are fabulous! Thanks so much, it worked like a charm.

Have a great day!

Lanie
laniet@ij.net
etroidl@conaxfl.com


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top