cancel
Showing results for 
Search instead for 
Did you mean: 

how to allow null (or empty) in a date field in form designer

Former Member
0 Kudos

Hello,

My form has date fields. The binding is to ABAP DATS data type. The display pattern is date{YYYY-MMM-DD}. When the

binding variable has a value for example 20100203 the field should display 2010-Feb-03 and when the binding variable has an initial value I would like to see NO VALUE in the date field. HOWEVER, when the binding variable has initial value I am seeing

00000000 in the date field. Do you see something that I am missing, or is it necessary to perform scripting to make it work--when binding variable is initial the form field should be empty and when binding variable has a value display in selected display pattern. Thanks for any insight. Regards p812661

Accepted Solutions (0)

Answers (2)

Answers (2)

OttoGold
Active Contributor
0 Kudos

Hello again, have you found any better approach? It would be useful to know. if not, maybe you can close the thread.

Thank you, regards Otoo

Former Member
0 Kudos

Hello Otto,

Here is alternate approach (does not require scripting ) that checks ok for my requirements : a. In the form designer the field of interest is made a date-time field; b. The edit and data properties are set to a desired date mask; c. The field is mapped to a string; d. During runtime, the data assigned to the string can be initial (empty string) or it can be a string that is plausible as an ABAP DATS data-type. Thank you very much for your information and insight. Regards.

Edited by: jb10809 on Mar 5, 2010 2:31 PM

OttoGold
Active Contributor
0 Kudos

Hello,

use scripting, for example JavaScript.

Use a script like this if (this.rawValue == '00000000') this.rawValue = "". //this will clear the value

place this script on event initialize for example. on client, language java script.

Regards, Otto

p.s.: to start with scripting please read:

Where to start with scripting:

http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_ba...

http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf

Former Member
0 Kudos

Hello Otto,

Thank you. I was thinking that the same results could be achieved without resorting to scripting by setting the 'proper' combination of properties within the designer. If that does not work...will use your approach. Best Regards