dinesh1238
8th July 2010, 17:53
Hi,

I have developed a maintain session with two forms of Type 2.
After navigating to Form 2 when I return back to Form 1 and try to insert a new record, the old values in ALL display fields (Eff Dt, Exp Dt etc) is not getting cleared… I tried refresh() but it does not work

Refer attached screen shots….

Can someone let me know how to clear the old values in multi occurance form? Is there any standard function available?

Cheers
Dinesh

mark_h
8th July 2010, 19:43
Are these fields from the main table of the session? Or are they display fields looked up by the script a. I remember having this type problem once before. Also can you confirm these fields are multi-occurence fields.

Thanks

dinesh1238
9th July 2010, 11:28
Hi Mark,

Yes, they are display field defined as variables and looked up by the script. And they are multi occurence fields.

I noticed, if I minimize the session and maximize it once again, the old values gets clearead. But I need a solution to clear the old values as soon as the new record insert is done.

Cheers
Dinesh

mark_h
12th July 2010, 18:05
What do you mean they are display fields defined as variables? Post the relevent code on how you are populating these fields. I will look around on our systems for where I might have fixed one like this.

dinesh1238
12th July 2010, 19:03
Script attached...
Date fields (Eff Dt, Exp Dt) are Display fields and is defined as variables...means data in initialized using program script in "before.display" section.

Cheers
Dinesh

Hitesh Shah
12th July 2010, 19:09
Hi Mark,

But I need a solution to clear the old values as soon as the new record insert is done.

Cheers
Dinesh

Set attr.dorp to true in before.input section if possible.

mark_h
12th July 2010, 19:53
I found a session doing exactly what was mentioned. I took the below code which is now commented out.

field.tiitm990.item:
before.input:
| disp = 2
| clear_screen()
| tiitm001.item = ""
| display("tiitm990.item")
|

| after.display:
| if(disp=1) then
| get_desc() | Get tiitm001 description
| endif
|


I added this:


field.tiitm001.dsca:
before.display:
get_desc()


This solved the complete problem of not having the fields blanked out. I just moved where I got the description.