Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
18%
200 - 500 GB
26%
500 - 800 GB
3%
800 - 1200 GB
9%
1200 - 1500 GB
12%
1500 - 2000 GB
12%
> 2000 GB
21%
Total votes: 34

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 10th February 2004, 20:17
lauras's Avatar
lauras lauras is offline
Junior Member
 
Join Date: Dec 2002
Location: Kansas City
Posts: 16
lauras is on a distinguished road
Baan: B4c4 - DB: Oracle 10g - OS: Windows 2000/XP
return value from zoom

I have a session that needs to zoom to different sessions depending on the main "type" value. One of the sessions zoomed to returns a number instead of a string. I have entered 'on.exit' logic in the zoomed-to session to change the value to a string, but when the zoom returns, I still get an error because "expecting STRING".

I have tried putting a statement in the after.zoom to convert to string, that doesn't work either. How do I set the return value to a variable? I don't see a predefined variable for that. There are predefined variables for the zoom session, the zoom return field (meaning the table.field name of what will be returned), and the attribute variables. I don't see a variable that holds the value when returning from the zoom.
__________________
Laura
Reply With Quote
Sponsored Links
  #2  
Old 11th February 2004, 12:36
dorleta's Avatar
dorleta dorleta is offline
Senior Member
 
Join Date: Dec 2001
Location: Madrid - Spain
Posts: 134
dorleta is on a distinguished road
Baan: BaanIV - DB: All - OS: All
The standar solution.

function extern long tgwms0004.start.application(const string application(),
const string arguments (),
domain tgyenox local,
long mode,
[long pop_up])
{
DLLUSAGE
This function starts the application with the given arguments. The given
application may not be empty, the arguments may be empty.

Parameters:
application the application which must be started
arguments the arguments with which the application will be started
local if tgyenox.yes then the application will be started on the
local machine, otherwise it will be started on the server.
Note that only on BW the tgyenox.yes should be used, in which
case a: "create.object(DsCapplication, 0, ...)" will be done.
In all other cases either a "shell()" or "run.prog()" will be
done depending on the current Baan version.
This function does NOT check whether the current platform is BW.
mode the mode needed for "shell()" or "run.prog()"
pop_up whether (if true) or not (if false) pop-ups on errors must be
given. Default is: false.

Return value:
= 0 successful completion, application started
< 0 some error occurred
-------------------------------------------------------------------------------
ENDDLLUSAGE
Reply With Quote
  #3  
Old 11th February 2004, 16:25
lauras's Avatar
lauras lauras is offline
Junior Member
 
Join Date: Dec 2002
Location: Kansas City
Posts: 16
lauras is on a distinguished road
Baan: B4c4 - DB: Oracle 10g - OS: Windows 2000/XP
huh?

I don't understand the reply to my original post. I'm not calling an outside application, and even if I was, I don't have enough information to know how/when to use this function. If it's a function that would return a string value, I would need to know where to use it, and how. Use it in the zoom from session or the zoom to session? It just doesn't make sense to me.
__________________
Laura
Reply With Quote
  #4  
Old 11th February 2004, 16:47
francishsu francishsu is offline
Member
 
Join Date: Nov 2001
Location: Holland, MI USA
Posts: 52
francishsu is on a distinguished road
Baan: IVc4 - DB: Oracle - OS: HP-UX
It'd be helpful if you could post the zoom.to$ statement from the parent session and the code from the child session related to the variable you are trying to return on the parent.

That being said..

Personally, I like to use the import()/export() functions to "pass" values between parent and child. Using import and export, there's no need to worry about converting to string and you can copy multiple variable values this way.

Basically works as follows:
Parent session
declare variables to be made available to the child as extern
execute the zoom.to$ function to execute the child session

Child session
declare variables for holding the values that will be imported from the parent session and exported to the parent
create the appropriate zoom.from section with import/export code
e.g.
zoom.from.<parent zoom.to$ argument>:
on.enter:
import("<parent variable name 1>", <child variable 1>)
import("<parent variable name 2>", <child variable 2>)
etc.
on.exit:
export("<parent variable name A>", <child variable A>)
export("<parent variable name B>", <child variable B>)
etc.
Reply With Quote
  #5  
Old 11th February 2004, 17:06
lauras's Avatar
lauras lauras is offline
Junior Member
 
Join Date: Dec 2002
Location: Kansas City
Posts: 16
lauras is on a distinguished road
Baan: B4c4 - DB: Oracle 10g - OS: Windows 2000/XP
tried import/export

I'll paste in the code after a comment or two. This zoom is on a field, so my options are limited to before.zoom and after.zoom in the calling session (as far as I know). I don't actually code the zoom.to$ statement, I'm modifying the attribute variables to change where the zoom goes.

first session, field user zooms from -

field.tcmcs960.bans:
before.checks:
tcmcs960.bans = toupper$(tcmcs960.bans)
display("tcmcs960.bans")

check.input:
verify.input()
set.ftyp()

before.zoom:
set.zoom.fields() {defines zoomsession and zoomreturn}
zoomfield$ = "tcmcs960.bans"
zoomreturn$ = "ret.field"
attr.zoomsession$ = z.sess
attr.zoomreturn$ = z.fld
attr.zoomcode = z.session + z.autoaccept

after.zoom:
import("tcmcs960.bans",ret.field)

(I've tried a bunch of different things, this is the current version)

second session, zoom logic -
zoom.from.tcmcs960.bans:
on.exit:
zoom.field = str$(tccom001.emno)
export("tcmcs960.bans",zoom.field)

I hope that clears up what I'm doing, maybe someone can help!
Thanks.
__________________
Laura
Reply With Quote
  #6  
Old 12th February 2004, 10:00
dorleta's Avatar
dorleta dorleta is offline
Senior Member
 
Join Date: Dec 2001
Location: Madrid - Spain
Posts: 134
dorleta is on a distinguished road
Baan: BaanIV - DB: All - OS: All
Sorry this reply is for another question about use external programs in baan . Excuse me.
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
Zoom to Menu and return fields mark_h Tools Development 12 2nd May 2012 20:44
Zoom and return vallue ICT Builder Tools Administration & Installation 0 4th May 2004 18:15
zoom return field from tt session spartacus Tools Development 2 17th July 2003 10:14


All times are GMT +2. The time now is 18:36.


©2001-2018 - Baanboard.com - Baanforums.com