morpheus
10th January 2003, 11:49
Hello,
There are 2 sessions, which I have combined to appear as one, just like Sales/Purchase Order Lines. In the upper half (1st session), some fields are being imported, and displayed, from the session from which it is zoomed, and in the lower part (2nd session) there are three forms. Only one of these forms become active depending upon the data imported in upper half.
Now, the problem is, for Form 1, all the input fields are displayed while maintaining a record. Whereas, in the other 2 forms, only first text field is displayed, and others are displayed IF I press a "tab". The problem remains even if I change the sequence of Forms. It is always the last 2 forms which are behaving like this!!
Any ideas why!!?
:confused:

morpheus
11th January 2003, 08:13
Another thing I observed is that, the scenario explained earlier only takes place if the table is empty, and FIRST record is being maintained. But, once the first record is maintained, the forms behave normally!!

mark_h
12th January 2003, 03:52
It looks like this is a sub-session that you zoom to for project 600005 correct? And since 600005 does not have any records in the table of this sub-session then forms 2 and 3 forms act like you say. I was just wondering if you could zoom to it and do an add.set when no records exist. Hmmm what is the start option on the sub-session? Does it act this way when you zoom to it for a project with a record already existing?

Not much help but maybe the questions will help someone else solve the problem.

Mark

morpheus
14th January 2003, 12:50
Yes, Mark, you are right, it's a sub-session.
I am using add.set, if there is no record for the Project, and modify.set, if there is a record.
The start option of the sub session is "Refresh".
And it does not behave in such a manner if the record is maintained for the Project.
I also thought the same way, that the last 2 forms are behaving in such a manner because there is no record for the project. But, why and that too for only last 2 forms!!?:confused:

lbencic
14th January 2003, 18:56
I also have no answer, only more questions.
Are the second and third forms still in modify status? It almost sounds like they are in add. In debug, can you check the update.status variable going through the rest of the forms?
Also, the 'Refresh' start option on the session may be interfering with your 'Add.Set' and 'Modify.Set' logic, did you set the predefined variable 'ignore.first.event = true' in the before.program section?

morpheus
15th January 2003, 07:49
Thanks Lisa!!
I did not set ignore.first.event = TRUE in the script. I did that after your post, and now it is working fine. :)

Thanks Mark, for your post too. :)

I understand what ignore.first.event does, but can you explain me why the last 2 forms behaved in such a manner when the mentioned variable was not used in the script!!?

lbencic
15th January 2003, 17:16
Hmm no not really. It may have to do with the Refresh forcing itself on Form 1 at the start, so you got all the fields up and were ready to modify, regardless of your logic. On situations where you switched to the other forms, your code should have taken over, but already the event was set, so....confusion I guess.

Svetlana
22nd January 2003, 13:00
Hi, morpheus.
You combined 2 sessions to appear as one. How you do it?

morpheus
23rd January 2003, 07:54
Svetlana,
This is achieved by using the system variable sattr.combined. You can find details in the BaaN manual on your system.

Svetlana
23rd January 2003, 14:36
Thank you.