pjohns
3rd May 2002, 11:10
In session tdsls4531m000, form 5, I have created a button that will zoom to session tdsls9546m000. I cannot get my zoom to work correctly if I select a record in tdsls4531m000 and press the zoom button I would like the same record to show when I go into tdsls9546m000.

I have entered the following into the tdsls4531 script: -

choice.user.0:
on.choice:
zoom.awb = tdsls946.awb
zoom.to$("tdsls9546m000", z.session, "tdsls4531m000", "", 0)


When I compile I see the following warning:-

ptdsls45310(239) Warning (3): Return value for function 'zoom.to.menu' ignored

Is this because I need Baan source to make this function work?

Thanks

PJ
(Novice Developer)
:confused:

alejandro
3rd May 2002, 11:37
Warning is only that, and advice. zoom.to$ is a function that returns a long value. Simply you used this function ignoring its return value. But that is not a problem.

If the subsession you call has Refresh as init option (see session definition) you have only to put values to key fields of this subsession before call zoom.to$. This key fields have to be declared also in main session as extern.

If not, use export in session and import in subsession functions and then a refresh or a find.

Hope this help.

pjohns
3rd May 2002, 13:35
alejandro,

Thank you for your reply.

I have declared the fields in the tdsls4531 script as follows:

extern domain tdsls.awb zoom.awb

With regards to the other advice you have given me. I do not nderstand what you are saying(my Baan scripting is extremely limited!) so I will have to speak to overseas work colleagues and ask them to make the changes.

Thank You

PJ

evesely
3rd May 2002, 19:10
export() and import() are shorthand versions of the get.var() and put.var() functions. They allow you to export a variable to or import a variable from the parent process. So, in your subsession, you could do import("zoom.awb", child.var)

Here, zoom.awb is your variable in the parent (tdsls4531m000) process and child.var is the variable in the child process. Both should be declared as externs. For table variables, however, you can often just set the value in the parent process before zooming and then skip the import.

I hope that helps.