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!

IF FIELD IS BLANK, PRINT ANOTHER FIELD 1

Status
Not open for further replies.

AMHCLH

Programmer
Nov 26, 2002
23
US
I have created a formula field to print a field called Short Item if it isn't blank; otherwise, I want the field Item to print. This is my formula
If ({BIDDTL.ShortItem}=" ") Then {BIDDTL.Item} Else {BIDDTL.ShortItem}

It works to print the Short Item when it is filled, but when Short Item field is blank, nothing prints.
 
You should check the data source.

The ({BIDDTL.ShortItem} string may be NULL and therefore is not equal to ' '.
 
Thanks for responding. I changed the formula to check for null as well, but I still don't get any value to print.

If ({BIDDTL.ShortItem}<>&quot;&quot; And {BIDDTL.ShortItem}<> &quot; &quot;) Then {BIDDTL.ShortItem} Else {BIDDTL.Item}
 
But a null check in your formula:

If isnull({BIDDTL.ShortItem}) or {BIDDTL.ShortItem}=&quot; &quot;
Then {BIDDTL.Item} Else {BIDDTL.ShortItem}


I also noticed you have a single space in the quotes (&quot; &quot;)instead of &quot;&quot;.



Mike
 
That should have been &quot;Put a null.. &quot;

I didn't read your first post corretly.
Mine formula should have been:


If not(isnull({BIDDTL.ShortItem})) or {BIDDTL.ShortItem}<>&quot; &quot;
Then {BIDDTL.Item} Else {BIDDTL.ShortItem}


Mike
 
Thanks! It works now. Gave you a star.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top