outra9e
10th March 2003, 11:48
Hi everyone, Im back again!

I have recently used some scripting on a button which opens a new session and passes over some values, I want to do the same but instead of froma button, I want to do this from a field zoom....

here something similar I used on the button....

choice.user.0:
on.choice:
zoom.trno = tssma906.trno
export("zoom.trno", zoom.trno)

zoom.to$("tssma9135m000", z.session, "tssma9135m000", "", 0)


Any ideas wherei should be putting this for the field zoom?

Cheers

kammie
10th March 2003, 13:11
Main sections are:

field.<fieldname>:

field.all:

field.other:


The available subsections within this main sections, related to zoom are:

before.zoom:

after.zoom:

outra9e
10th March 2003, 13:12
excellent, thanks for this, will try straight away...

:)

outra9e
10th March 2003, 14:01
kammie

I have entered this in the session that I am zooming from, on the field....

*************************************************
field.tssma906.scdid:
before.zoom:
zoom.stdt = tssma906.tsdt
zoom.cust = tssma906.cust
zoom.to$("tssma9131m000", z.session, "tssma9106m000", "", 0)
*************************************************

then on the session being opened, I have entered this.....

*************************************************
|****************forms****************************

form.all:
init.form:

zoom.from.tssma9106m000:
on.entry:
import("zoom.cust", zoom.cust)
import("zoom.stdt", zoom.stdt)
*************************************************
|****************fields****************************

field.tssma931.cust:
before.input:
tssma931.cust = zoom.cust


field.tssma931.stdt:
before.input:
tssma931.stdt = zoom.stdt
************************************************

Obviously I have declared the zooms as extern domains, but is there something I am missing?

The scripts compile with no errors, but the values are not being passed across.

Any ideas?

Cheers

evesely
10th March 2003, 15:59
Have you tried to put your destination session in debug mode and make sure that the "zoom.from" is executing and the variables are being populated? To be honest, I have never put a zoom.to in a before.zoom field section, but I suppose it still work (does it zoom twice?). The importing piece looks good. What value does zoomfield$ have?

outra9e
10th March 2003, 18:52
Ed

I have run in debug, and it is picking up the point where the line in the code says....

field = zoom.name

but it is not populating...

mgakhar
10th March 2003, 19:17
Maybe you need to do a display(fieldname) after assigning the zoom value to your field.

MG.

outra9e
11th March 2003, 10:59
I need to declare the zoom.names in the Called session, otherwise the script will not compile, telling me that the zooms are not declared.

outra9e
11th March 2003, 11:05
Here is the script thus far...

***********************************************

|*************** declaration section *********
declaration:

table ttssma906 | Transactions
table ttssma931 | Training Schedule
table ttssma934 | Trainees on Course
table ttssma937 | Required Course Sections
table ttssma900 | Training First Free Number
table ttssma930 | Courses
table ttssma938 | Instructors


extern domain tssma.ffno zoom.scdid | trno Added by AF 17022003 | extern domain tccuno zoom.cust | trno Added by AF 17022003
extern domain tccuno zoom.cust | trno Added by AF 17022003
extern domain tcdate zoom.stdt | trno Added by AF 17022003

|*******************forms***************

form.all:
init.form:

zoom.from.tssma9106m000:
on.entry:
import("zoom.cust", zoom.cust)
import("zoom.stdt", zoom.stdt)


|******************choices*****************

choice.user.0:
on.choice:
zoom.scdid = tssma931.scdid
| export("zoom.scdid", zoom.scdid)

zoom.to$("tssma9134m000", z.session, "tssma9131m000", "", 0)

choice.user.1:
on.choice:
zoom.scdid = tssma931.scdid
| export("zoom.scdid", zoom.scdid)

zoom.to$("tssma9137m000", z.session, "tssma9131m000", "", 0)


|************************fields********************

field.tssma931.scdid:
before.input:
If tssma931.scdid <> 0 then
attr.input = false
endif

get.first.free.number()

field.tssma931.cust:
before.input:
tssma931.cust = zoom.cust


field.tssma931.stdt:
before.input:
tssma931.stdt = zoom.stdt

evesely
11th March 2003, 15:58
I just want to be clear on the symptoms. If you are in debug mode in the called session and stop on the field line with the "tssma931.cust = zoom.cust" assignment, if you check the value of zoom.cust, does it show the right value? Immediately after executing that line, however, tssma931.cust does not? I don't see how that could happen, but to be sure maybe you can put a dummy line after that so you can stop the debugger and check the field value.

outra9e
11th March 2003, 16:42
I shall do now, let me just check, I am running the debug, on the session that is called.

Is that correct?

kammie
11th March 2003, 16:54
You wrote: when the called session is in debug mode, it is picking up at the line in the code says: field = zoom.name

That's are incorrect situation because, when everything goes right, the debugger should pick up at the line import(.....)

At the moment I do not have any sources available, so I can not check my own creations...

The manual says about main sections:

zoom.from.<zoom name>:

Each field name has a name that can be used as a zoom name. You can specify the zoom name in this main section. The zoom name indicates which field the current session is zoomed from.

So I would suggest that you try the following in the called session:

zoom.from.tssma906.scdid:
on.entry:
import(...)
import(...)

outra9e
12th March 2003, 13:21
Kammie

I am currently performing the import on the form section...

|***********************forms************************

form.all:
init.form:

zoom.from.tssma9106m000:
on.entry:
import("zoom.cust", zoom.cust)
import("zoom.stdt", zoom.stdt)

***************************************************

Should it actually be like this?

|***********************forms************************

form.all:
init.form:

zoom.from.tssma906.scdid:
on.entry:
import("zoom.cust", zoom.cust)
import("zoom.stdt", zoom.stdt)

***************************************************


Cheers

outra9e
17th March 2003, 17:16
I have tried this both on the form.all and main.table...




main.table.io:
zoom.from.tssma9106.scdid:
on.entry:
import("zoom.cust", zoom.cust)
import("zoom.stdt", zoom.stdt)

It does not error when compiled either way, but it is not pushing the values across....

Any ideas?

Cheers

outra9e
18th March 2003, 11:22
Guys

Just to give you an update...

I have decided against scripting on the form zoom.

I have now removed the field and added a field to the called section which will give the link.

Now I am using a button which forces over the values.

Cheers