psehouri
29th July 2002, 12:20
Hello,
I have the following problems :

1°) I launch a sub session (type 3) andI do a change.view.
It replies me that another view found...

When I make a get fields, it gives me the good record....

2°) When I put fields, and save, there is a cancel command... and data is not save.

AFS.LOG :

LOGGING STARTED
29/07/2002
3->get.fields
3<-get.fields...
>pspmg0202m000 put.field:pspmg001.orno 39752
>pspmg0202m000 Find
3->def.find
3<-def.find01
<pspmg0202m000 record found (1)
>pspmg0202m000 put.field:comp.batch.frm tcyesno.yes
>pspmg0202m000 put.field:cmdt.frm 29072002
>pspmg0202m000 handle.subproc tdilc4113s000 add
>pspmg0202m000 continue.process
3->cont.process
5<-api.child.startedtdilc4113s0003
5->get.fields
5<-get.fields...
<pspmg0202m000
>tdilc4113s000 change.view
5->start.set
5<-start.set
<tdilc4113s000 2 another view found
>tdilc4113s000 put.field:tdilc402.qstr 100
>tdilc4113s000 put.field:tdilc402.orno 100
>tdilc4113s000 save
5->update.db
5<-update.db
<tdilc4113s000
>tdilc4113s000 end.session
5->end.program
5<-end.program1Command cancelled
>pspmg0202m000 end.session
3->end.program
3<-cont.process
3<-end.program1

klesch
29th July 2002, 14:31
Can you post a code wich you use to do that, too?

psehouri
29th July 2002, 14:58
Yes, of course, here's the code...

klesch
29th July 2002, 15:04
I did not realize that this is a VB code. I'm sorry, but I'm not able to help you, because I'm not familiar to VB.

Maybe, somebody else will know what the problem is.

mark_h
29th July 2002, 22:39
Since I am not and work and can not see the session I can only make a few guesses. Is there more than one key field on the session? By this I mean if you went to the sub-session and did a find does it require more than one field? If yes then try to put those fields also. If not that then you may want to try setting the view first. Can't really tell since I am not familiar with the session. Will check when I get to work tomorrow.

Good Luck!

Mark

psehouri
30th July 2002, 10:41
Yes, there's 5 fields for the index. Just before doing the Change.View, I make a Put... But, it is still the same...


What do you mean by setting the view first ???

Thank's for the time you take to make responses...

mark_h
30th July 2002, 17:00
Since I am not familiar with the form, I was thinking that maybe putting the five fields then doing a stpapi.change.view on the form. And then checking the return value to see if it found a view. This is usually done on a multi-occurance form.

Also I have never called a sub-session this way. I always use the main session and let it zoom or call the sub-sessions. I know others have used this method successfully.


Mark