sajjadnb
18th December 2009, 06:33
Hi All,

I have a date field say “redt”, domain: tcdate on a form. I want that the user should not be able to manipulate the time part of the field. Also I do not want to change display format of the field at the form level. So, I disabled only the "time"-segment of this field using "disable.fields (“redt.time”)".

But now "when.field.changes" and all other field checks don’t work anymore for that field. Please suggest how can i achieve this.

N.B: The same problem persists even if I try to make the time part of the field invisible at runtime using “inputfield.invisible(“redt.time”)”

ranjankool
29th December 2009, 13:48
hi,
try it in before.display or before.input, it will surely work.

NPRao
29th December 2009, 21:36
sajjadnb,

Refer to the thread - when field changes on date field (http://www.baanboard.com/baanboard/showthread.php?t=24376)

Use search on the forum to look for already discussed threads.

sajjadnb
30th December 2009, 11:03
Hi,

No, even before.display or before.input do not get hit.

Also i have also just went thru the thread http://www.baanboard.com/baanboard/showthread.php?t=24376, but i guess the solutions provided are for baan 5c but i am on Baan LN where none of the field checks get hit.

Regards,
Sajjad

NPRao
30th December 2009, 20:18
but i guess the solutions provided are for baan 5c but i am on Baan LN where none of the field checks get hit.
In 5c, or LN Tools, if you have a DAL for a tablefield, then the UI check.input section is skipped. The proper way is to add your checks in DAL or DAL2.

sajjadnb
31st December 2009, 04:29
I agree but I even tried this on a session without a main table where the DAL/DAL2 does not come picture still this won’t work.

Nagesh
2nd January 2010, 15:48
Hi,

You said, you have used "redt.time" to disable/invisible field.
In the similar fashion, did you try like

field.redt.date:
when.field.changes:

Best Regards,
Nagesh.

sushil
3rd January 2010, 10:36
Hi,

Can you post the Code - it helps to visualize the problem !

saumya
4th January 2010, 11:57
check on form field sequence is right?

sajjadnb
4th January 2010, 12:52
This how my code is and i want the time field part disabled not the date part


field.redt.time:
check.input:
message("hi")

when.field.changes:
message("hi")

saumya
5th January 2010, 08:10
since field "redt.time" is disable, check.input and when field changes will not work for this.

sajjadnb
6th January 2010, 07:20
since field "redt.time" is disable, check.input and when field changes will not work for this.

Thanks. I knew that, but here I am looking for a workaround or some other to stop the user from changing the time.