I have defined a date field on my page which is bound to a 6s0 numeric field with a date field formatting and a date format of '01/15/11'.
I want the field to be optional (i.e. return zeros if it blanks). The field works correctly if no keying is done in the field. However, if the user enters a date and subsequently blanks it out the field is automatically filled with '010101' when control is returned to the RPG program.
I have tried setting the "allow blanks" property to true, but this did not have any effect.
I have tried setting the "blank value" property to '0', but then an invalid date message is displayed by the screen.
Is there a way to use the date field widget and allow for a date to be cleared (i.e. set to zero)?
Allow blank value with date field
-
- Profound User
- Posts: 72
- Joined: Fri May 08, 2009 2:43 pm
- First Name: David
- Last Name: Esdale
- Company Name: Guardian General Insurance
- City: Port of Spain
- State / Province: Outside Canada/USA
- Country: Trinidad and Tobago
- Location: Trinidad
- Contact:
- Brian
- Profound Logic Staff Member
- Posts: 286
- Joined: Thu Apr 14, 2011 10:23 am
- First Name: Brian
- Last Name: May
- Company Name: Profound Logic Software
- Contact:
Re: Allow blank value with date field
try setting the blank value property to some valid date in the distant past or future. Your program can check for this value and change it to 0 if you like once it regains control.
-
- Profound User
- Posts: 72
- Joined: Fri May 08, 2009 2:43 pm
- First Name: David
- Last Name: Esdale
- Company Name: Guardian General Insurance
- City: Port of Spain
- State / Province: Outside Canada/USA
- Country: Trinidad and Tobago
- Location: Trinidad
- Contact:
Re: Allow blank value with date field
I have decided to change the field formatting to numeric with an edit word of '0 / / '. This provides the functionality that I am looking for.
However, I now have to define the bound variable as Decimal 6,0 instead of using a reference field as I had done previously. The desinger complains if an Edit word is used with a data type of "use reference field".
However, I now have to define the bound variable as Decimal 6,0 instead of using a reference field as I had done previously. The desinger complains if an Edit word is used with a data type of "use reference field".
Who is online
Users browsing this forum: No registered users and 2 guests