smi4975
25th February 2010, 17:22
Hi,
I have 2 sessions (tiitm2100m000) and (tiitm2101s000). I'm trying to pass in the values from the main session to the subsession when i click a button.
The following is the code for the same:
Parent session:
Choice.user.0:
on.choice:
if marked then
hold.item = tiitm200.item |**** hold.item is defined as extern
zoom.to$("tiitm2101s000",z.session,"","",0)
else
message("Select a Record First")
endif
Subsession
form.1:
init.form:
if background then
import(hold.item,hold.item) |** hold.item is defined as extern
tiitm201.item = hold.item
endif
display.all()
When i debug both the sessions, i see the value being initialized to hold.item in the parent session, but when it comes to the subsession, it losses the value.
I tried to make my subsession as Main session also with start option add.set and even with refresh.. but neither case it does not work.
Can you please help me out what am i doing wrong?
I read in the other posts that it is not necessary to use export and import in both the sessions.
a. i tried using export("tiitm200.item",hold.item),in the main session but while debugging the variable did not even get the value.
b. I also tried using zoom.from.<session> option also but still no luck
It is a very simple passing of values and not very complicated logic also. i just need to pass 3 other values apart from the one stated and then in the subsesison insert other values and save that is it.
I need to resolve this urgently please help me out...
I have 2 sessions (tiitm2100m000) and (tiitm2101s000). I'm trying to pass in the values from the main session to the subsession when i click a button.
The following is the code for the same:
Parent session:
Choice.user.0:
on.choice:
if marked then
hold.item = tiitm200.item |**** hold.item is defined as extern
zoom.to$("tiitm2101s000",z.session,"","",0)
else
message("Select a Record First")
endif
Subsession
form.1:
init.form:
if background then
import(hold.item,hold.item) |** hold.item is defined as extern
tiitm201.item = hold.item
endif
display.all()
When i debug both the sessions, i see the value being initialized to hold.item in the parent session, but when it comes to the subsession, it losses the value.
I tried to make my subsession as Main session also with start option add.set and even with refresh.. but neither case it does not work.
Can you please help me out what am i doing wrong?
I read in the other posts that it is not necessary to use export and import in both the sessions.
a. i tried using export("tiitm200.item",hold.item),in the main session but while debugging the variable did not even get the value.
b. I also tried using zoom.from.<session> option also but still no luck
It is a very simple passing of values and not very complicated logic also. i just need to pass 3 other values apart from the one stated and then in the subsesison insert other values and save that is it.
I need to resolve this urgently please help me out...