E.Toniolo
21st February 2002, 13:32
Hi,
I must open the zoom session tdilc0510s000 to show the locations associate to a certain wharehouse.
The Zoom session is in the standard layer and I would not like to modify it.
In practice the same behaviour which is present in the tdilc0110m000 session or in the tcmcs0103m000 (form 2).

I have tried to set the value of the field tdilc001.cwar (in before.zoom event) with the wharehouse which I have preselected but the session always shows me the first set. :mad:

Help me!

Bye
Emanuele

alejandro
21st February 2002, 15:19
you can use export function in the session and import function in the subsession.

The field has to be defined as extern in both programs.

Main Session:

before.zoom section

export("variable",expression)

In Subsession:

In before.program:

import("variable",ref variable)

You have now in your called session the value to find.
If you want to restrict occurrences to that value you can also use in this section the predefined variable queryextension

queryextension=" where ...=[value imported] and apply this only if import is successfull.


Hope this helps.

E.Toniolo
21st February 2002, 16:02
Hi Alejandro,
This is OK, but I cannot modify the sub session.
What I do not understand is as the sessions like the
tcmcs0103m000 work, they do that one exactly that I would like without no particular code (at least then it seems to me).
It must be another road there.

Thanks however.

Emanuele

evesely
21st February 2002, 16:24
Is it doing a first set (same warehouse, first location) or first view (first warehouse, first location)? I could see first set if you didn't also define tdilc001.loca in your before.zoom since it is part of index1. However, I get the impression that you are seeing first.view. If so, I'm as puzzled as you. You shouldn't have to import the table fields.

I know you don't want to alter the zoom session, but could you at least temporarily put one in debug and see what is happening?

E.Toniolo
21st February 2002, 16:47
Sorry, it is a first.view (first warehouse, first location).

Ok, I try to debug the session :( .

Bye

lbencic
21st February 2002, 17:38
If you don't want to modify the subsession, it must be set up to recieve from a main and do the look up already. There are 2 ways:
1. The session options are set to look up using the "find.data" (Refresh) Start Option.
2. The zoom.from section is written to receive values and do the lookup when zoomed to. If that's set up, it will ignore the event defined in the session.

The second is the most common. But, this one doesn't do either. It has no zoom from section, and the start option is "get.defaults" (??). I suggest you copy the session only (not the script component) and change the start option to 7 - find.data (Refresh).

popeye
21st February 2002, 22:02
Hi,
There is no need for exporting/importing stuff or coding in the zoom sections.

Just assign the values to the "find" fields b4 calling zoom.to function.
In your case Warehouse.

Check the following example.

function main()
{
string hold.str

table ttdilc001

tdilc001.cwar = "3TR"
zoom.to$("tdilc0510s000 ", Z.SESSION, "", "", 0)
}