You can create a calculation field to use as the field label:
If ( DiscountField ; "Discount" ; "" )
(You can leave out the ; "" and get the same results)
Now delete the layout text and replace it with this field.
I created a calculation field named Discount_Print and put in the calculation you provided, replacing DiscountField with Discount_Print, which is my field name, and this is not working.
"Not working" doesn't give me much to go on. How is it "not working"?
Make sure you have If ( Discount ; "Discount" ; "" )
If ( "Discount" ; "Discount" ; "" )
Sorry, it's not displaying the word "Discount"
It does say:
If ( Discount ; "Discount" ; "" )
I assumed Discount was a number field. Is it text by any chance? If so, change it to number as that's what it should be.
You might also use this form of the calculation but the extra function shouldn't be needed for a number field:
If ( Not IsEmpty ( Discount ) ; "Discount" ; "" )
It is a number field, yes.
I tried the additional function anyway and this didn't work either. =/
perfect. I have a discount percentage field and a discount total field and I was calculating based on the percentage field instead of the total.
Thanks for your help!
I am trying to use this calculation again on a HOTEL CHARGES field from the same table.
I created a "HoteChgesPrint" field and made it a calculation field with the following:
If (Hotel_Charges; "HOTEL CHARGES"; "") I also tried If ( Not IsEmpty ( Hotel_Charges ) ; "HOTEL CHARGES" ; "" )
Hotel Charges is a number field and HotelchgPrint is a Calculation field -- just as the above was true for Discount and Discount_Print. It's set up exactly the same as the Discount Print field, but its not presenting.
"HOTEL CHARGES" is not appearing as the field label when HotelCharges has a number in it...