Highlighted

Make a "null" value white?

Avatar

Guest

16-12-2008

I have a field that combines 2 text fields (first and last name) and this field appears on every page. I used the following script to make it work:



form1.#subform[0].TextField13[0]::calculate - (JavaScript, client)

TextField13.rawValue = LastName.rawValue + ", " + FirstName.rawValue



The problem I am running into is that when the LastName and FirstName fields are blank, "null, null" appears in my field. I want people to be able to print blank copies of this form so I need to find a way to hide this.



I have tried changing the font to white if there is a null value but can't get any additional script to work for this field.



How should I attack this problem?



Thanks for any help you can provide.

Replies

Highlighted

Mark_Lindberg

16-12-2008

You could test the rawvalue of each field (FirstName & LastName), and only compute TextField13 if both are not null -

else TextField13.rawValue = ""