Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 24th February 2003, 12:18
outra9e's Avatar
outra9e outra9e is offline
Senior Member
 
Join Date: Nov 2001
Location: Crawley
Posts: 178
outra9e is on a distinguished road
Baan: Baan IV c4 - DB: Oracle 8.05 / Oracle 8i - OS: HP-UX
Question pushing field values from one session to another when button clicked

Hi everyone

I have created a button which when clicked, opens a session and trys to find a relevant record.

What I want the button to do is open the session so that a new record is to be inserted and passes over two field values to the corresponding fields on the session just opened.

Here is my current scripting....

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

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

Any ideas anyone?

Cheers
__________________
Best Regards

Andy Farr
Tokyo Electron Europe
Baan & Crystal Enterprise Administrator
Reply With Quote
  #2  
Old 24th February 2003, 14:53
evesely's Avatar
evesely evesely is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, Illinois USA
Posts: 411
evesely is on a distinguished road
export confusion

The functions export() and import() work only to/from the parent process. So, in this case, you would want to put import in your child session (and skip the export piece in this session). So, in your tssma9135m000 session you could do something like:
Code:
form.1:
init.form:
	if background then
		import("zoom.trno", zoom.trno)
	endif
You could also put this in some other section in the child process. Remember to declare the variables as externs in both the parent and child processes.
Reply With Quote
  #3  
Old 26th February 2003, 15:09
outra9e's Avatar
outra9e outra9e is offline
Senior Member
 
Join Date: Nov 2001
Location: Crawley
Posts: 178
outra9e is on a distinguished road
Baan: Baan IV c4 - DB: Oracle 8.05 / Oracle 8i - OS: HP-UX
Ed

I have taken you advice and the script on the "child" session compiles with no complaints, however it is not doing the trick. Initially I had the "child" session's start option to be find and so I changed this to be insert, but this hasn't helped either.

Can you think of any reason why it is not passing the value over?

Cheers m8y
__________________
Best Regards

Andy Farr
Tokyo Electron Europe
Baan & Crystal Enterprise Administrator
Reply With Quote
Sponsored Links
  #4  
Old 26th February 2003, 17:04
zardoz's Avatar
zardoz zardoz is offline
Guru
 
Join Date: Jan 2003
Location: Torino, Italy
Posts: 445
zardoz is on a distinguished road
Baan: Triton 2, Triton 3, Baan IV, Baan ERP, Baan LN - DB: Oracle, Tbase, MS Sql - OS: Unix, Windows
Try using this:
In the calling session,

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

zoom.to$("tssma9135m000", z.session, "NAMEOFCALLING SESSION", "", 0)
------------------------------------------------------------------------------------
in the session tssma9135m000:
.................
zoom.from.NAMEOFCALLINGSESSION:
on.entry:
import("zoom.trno", zoom.trno)
.................
field.????.trno:
before.input:
????.trno = zoom.trno
..................

Note: it's better for the called session to duplicate it in tdsls9135s000 because isn't a main session. You can of course use the same script and the same forms. In this new session the starting option can be different, as add.set by example.
Reply With Quote
  #5  
Old 26th February 2003, 18:01
evesely's Avatar
evesely evesely is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, Illinois USA
Posts: 411
evesely is on a distinguished road
Hmmm...

Andy,

Did you try running the subsession in debug mode to make sure the import was called? I assume that you declared the appropriate variables as externs in both sessions, right?
Reply With Quote
  #6  
Old 7th March 2003, 14:39
outra9e's Avatar
outra9e outra9e is offline
Senior Member
 
Join Date: Nov 2001
Location: Crawley
Posts: 178
outra9e is on a distinguished road
Baan: Baan IV c4 - DB: Oracle 8.05 / Oracle 8i - OS: HP-UX
It is called, it just does not push a value across - here is the current code....

I am using the "Export" expression on the parent session and also this code in the form section on the child session...

Code:
	form.all:
	init.form:

			zoom.from.tssma9106m000:
			on.entry:
			import("zoom.trid", zoom.trno)
Cheers
__________________
Best Regards

Andy Farr
Tokyo Electron Europe
Baan & Crystal Enterprise Administrator
Reply With Quote
  #7  
Old 7th March 2003, 14:56
evesely's Avatar
evesely evesely is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, Illinois USA
Posts: 411
evesely is on a distinguished road
Is the variable in the parent session zoom.trid or zoom.trno? Based on the previous posts, I think you have the variables backwards. Your code takes the parent variable zoom.trid and puts it into the zoom.trno variable in the child. If you want it the other way around, code it like:
Code:
import("zoom.trno", zoom.trid)

Also, you shouldn't need the export command in the parent. Based on you code, your parent should have a zoom command with "tssma9106m000" as the third argument.

Good luck
Reply With Quote
  #8  
Old 10th March 2003, 10:46
outra9e's Avatar
outra9e outra9e is offline
Senior Member
 
Join Date: Nov 2001
Location: Crawley
Posts: 178
outra9e is on a distinguished road
Baan: Baan IV c4 - DB: Oracle 8.05 / Oracle 8i - OS: HP-UX
SPOT ON!

Ed my good fellow!

Sopt on m8, have switched them over and its fine, Thanks a lot

Cheers
__________________
Best Regards

Andy Farr
Tokyo Electron Europe
Baan & Crystal Enterprise Administrator
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What button user clicked? MakamArun Tools Development 4 23rd May 2003 11:00
Pass values from standard session to a customized session !!! learner Tools Development 3 16th May 2003 21:07


All times are GMT +2. The time now is 15:26.


©2001-2017 - Baanboard.com - Baanforums.com