en@frrom
23rd June 2005, 17:37
I have something which seems strange, probably the heat is getting to me, and I overlook something simple...

My code:
field.date.f:
before.field:
message("hoi")

before.display:
message("hoi")

before.input:
message("hoi")

check.input:
message("hoi")

when.field.changes:
date.t = date.f

Of course the relevant code = only the when.field.changes part. When running the session, the section is not hit. After debugging with all above sections, the only event that was hit on this field was the check.input. For other fields on the form everything seems fine. date.f and date.t are declared, both on form and in script, with domain tcdate (utc), nothing out of the ordinairy....

What am I missing...?

mark_h
23rd June 2005, 18:53
I am not seeing anything in this code. Have you double checked the form fields? Made sure they were declared correctly and dumped the form again. I have also had to create RDD on forms a couple of times when they started acting up.

lbencic
23rd June 2005, 19:44
Bah, I think this is the same problem as the item.f / before zoom posting. The date field is segmented - try referring to:

field.date.f.date:


and/or


field.date.f.time:

Rita Kotecha
24th June 2005, 09:54
Please try out the following, it should work

when.field.changes:
if date.t < date.f then
date.t = date.f
endif

beginer
24th June 2005, 10:11
Hi ,

I also had problems with date field.
But then by trial & error I found that following thing some how works....
Try this...plz dont ask why this works :)

field.trdt.f.date:
when.field.changes:
trdt.t = trdt.f
display("trdt.t")

en@frrom
24th June 2005, 11:12
Thanks all for the responses! Like usually (mostly), Lisa was right again. I had already figured it out yesterday, but forgot to post it. All the other suggestions won't work, because as I had mentioned, the program doesn't even hit the when.field.changes section...

This is the way to get it working:

field.date.f.date:
before.input:
tmp.date = date.f

after.input:
if tmp.date <> date.f then
tmp.date = date.f
date.t = date.f
display("date.t.date")
display("date.t.time")
endif


Note: the reason I have to work with the tmp.date is because the program hits the when.field.changes section only after entering the time. But I want the date.t to be displayed already after entering the date... Also, the display I noticed for some reason, has to be done seperately for .date and .time....

Rita Kotecha
24th June 2005, 12:37
ok Thanks. I also tried it with field.date.f.date