Hiba_t
19th October 2005, 12:43
Hi all,

I'm writing a 3GL script and I want to zoom to a session for example ttadv3530s000 and let the user choose a report...

How can I get the value returned from the zoom in my 3GL script.. ?

I tried to use zoom.to$() but it didn't work it returned an empty value..

Thanks in advance,
Hiba_t

Youp2001
19th October 2005, 13:41
Hi,

Can't you use the import statement to import the variables needed?

Youp

Hiba_t
19th October 2005, 13:55
I tried to use import for the field that I need but I still get an empty value..

Is this the right way to do it.. ?

zoom.to$("ttadv3530s000", Z.SESSION, "tccommyprog", "" , 0)
import("ttadv330.crep", ttadv330.crep)

Youp2001
19th October 2005, 14:00
Strange. What Baan version are you using. I just checked an example here. In 4GL script in Baan ERP the table fields of selected record in zoom session are returned without problem.

Why are you using a 3GL script?

Hiba_t
19th October 2005, 14:03
I know it works for 4GL but I need it to work in 3GL for special reasons of mine..

I'm sorry I forgot to mention that I'm trying this on baan4..

vahdani
19th October 2005, 15:45
I tried to use import for the field that I need but I still get an empty value..

Is this the right way to do it.. ?

zoom.to$("ttadv3530s000", Z.SESSION, "tccommyprog", "" , 0)
import("ttadv330.crep", ttadv330.crep)

No, this won't work! When zoom.to$() returns is the called session (ttadv2330s000) aready closed. You cannot "import" from a closed session!

Try following which should also work in 3GL:


table ttadv330
ttadv330.crep = zoom.to$( "ttadv3530s000",
Z.SESSION,
"tccommyprog",
"ttadv330.crep" , |Defines returned field!
0)

Hiba_t
19th October 2005, 16:01
Thanks, It worked..