Trying to allow users to just enter the “digit” for the day (within this month) into a leave date field, and have Notes add the month and year - i.e. when I enter a 9 into the date field I want Notes to translate it into 12/09/05. My result now is 09/01/05. If I enter a 15 for the day the result is correct at 12/15/05. I see what Notes is doing but is there any way of getting the desired result other than entering 12/9 or coding? Thanks. SKip
Subject: Entering Day into Date Field
If you made it a text field, it would be easier to manipulate, something like this should work in the input translation:
cdte is the editable text field
Month := @Month(@Today);
Year := @Year(@Today);
@Text(Month) + “/” +cdate + “/” + @Text(Year)
If you need it in date format, just use another computed date field and it would evaluate to :
@TextToTime(cdate)
I would also recommend something for input validatation:
@IF(@TextToNumber(cdate) > 31; @Failure(“bogus day”); @TextToNumber(cdate) < 1; @Failure(“bogus Day”); @Success)
This will of course bomb for months with odd number of days (Feb, leap year, 30) -you will need to enhance this and test the validation.