Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
36%
Installation Wizard into new VRC
36%
Manual into existing VRC
7%
Manual into new VRC
20%
Total votes: 44

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 23rd July 2012, 05:29
layswan layswan is offline
Member
 
Join Date: Oct 2007
Posts: 55
layswan is on a distinguished road
Baan: BaanIVc - DB: InforMix 2.7 - OS: Sun Unix
Zoom Menu Return Multi Value
Baan: ERP LN 6.1 FP5
C/S: None/Unknown

Hi,

I created a session with a zoom field which zoom to a standard session "whinh5101m000" and it return "whinh501.loca" field after zooming. If I want it to return more than 1 fields like "whinh501.loca", "whinh501.item" and "whinh501.pono", what is the coding that I should put to return more than 1 fields?


Anyone help!!!


Thanks!
Reply With Quote
  #2  
Old 23rd July 2012, 08:06
rclabso's Avatar
rclabso rclabso is offline
Member
 
Join Date: Feb 2002
Location: Madagascar Africa
Posts: 42
rclabso is on a distinguished road
Baan: ERP Ln FP5 - DB: Oracle 11g - OS: Linux Suse
Hi,

in this case, you need to import the fields that you want to return to. please check the syntax in the dev help on how to use import field.

i hope this could be help.

rclabso
Reply With Quote
  #3  
Old 24th July 2012, 09:03
layswan layswan is offline
Member
 
Join Date: Oct 2007
Posts: 55
layswan is on a distinguished road
Baan: BaanIVc - DB: InforMix 2.7 - OS: Sun Unix
Quote:
Originally Posted by rclabso View Post
Hi,

in this case, you need to import the fields that you want to return to. please check the syntax in the dev help on how to use import field.

i hope this could be help.

rclabso
Hi,

Thanks for your reply!

But I still don't know how to use the import syntax to import the return field. Can you pls give an example of the code on how to use the import syntax?

Thanks!
Reply With Quote
  #4  
Old 24th July 2012, 09:42
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,699
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
Import

Quote:
Originally Posted by layswan View Post
Hi,

Thanks for your reply!

But I still don't know how to use the import syntax to import the return field. Can you pls give an example of the code on how to use the import syntax?

Thanks!
Hello,
from LN-DEV-Guide :

Importing variables
The browse list session needs to import one or more variables from the parent session. Based on the imported values, the browse list session reads records from the maintable and displays them.

Automatic import

The 4GL engine automatically imports variables (i.e. the primary key values). This happens in the following 5 situations:

Situation 1

From a parent session with main table X a browse list session is started with main table Y. Table X has a reference (foreign key) to table Y. E.g. X = Business Partner table, Y = Currency table. The currency field in the Business Partner table refers to the Currency table.The 4GL engine imports the browse field(s) from table X and stores them in the primary key fields of table Y.Consequences for programming in UI script: None

Situation 2

From a parent session with main table X a browse list session is started with main table Y. A field in table Y refers to table X. (In most cases, there is an identifying relationship between table X and table Y, e.g. order header (table X) and order lines (table Y).) The 4GL engine imports the primary key fields from table X and stores them in the primary key fields of table Y.

Example

Primary key of table X is order number

Primary key of table Y is order number, position number

The 4GL engine imports the order number from table X to the corresponding field of table Y. The position number field remains empty.

Consequences for programming in UI script: None

Situation 3

From a parent session with main table X a browse list session is started with the same main table. E.g. when the user browses from the Business Partner Details session to the Business Partners browse list session to select a Parent Business Partner.The 4GL engine imports the primary key values from the parent session of table X and stores them in the primary key fields of table X in the browse list session.

Consequences for programming in UI script:

Often a hierarchical structure exists in the same table. In those cases you want to override the automatic import by the 4GL engine, since not the primary key values should be imported, but the value of the browse field (e.g. the Business Partner Parent field) and that value should be stored in the primary key fields of the maintable of the browse list session. You should also take care of saving and restoring the primary key values, otherwise the record pointer of the parent session is set incorrectly.

Example

declaration:

table ttcom100

domain tccom.bpid hold.bpid

field.tccom100.prbp:
before.zoom:
|* Save the primary key field
hold.bpid = tccom100.bpid
tccom100.bpid = tccom100.prbp
after.zoom:
|* Restore the primary key field
tccom100.bpid = hold.bpid
Situation 4

From a parent session without a main table (e.g. a print session) a browse list session is started with main table X. The 4GL engine imports the primary key values of table X (if available) from the parent process and stores them in the primary key fields of the browse list sessions' main table.

Example

Browse list session Business Partners is started from the parent session Print Business Partners. The main table of the browse list session is tccom100. The 4GL engine tries to import tccom100.bpid from the print session and stores it in the tccom100.bpid field of the main table of the browse list session.

Consequences for programming in UI script:

In many cases you will have to re-program the parent session in such a way that the primary key fields of the main table of the browse list session are filled.

declaration:

table ttcom100

field.bpid.f:
before.zoom:
tccom100.bpid = bpid.f
Situation 5

From a parent session with main table X a browse list session starts with main table Y. There is no relationship between table X and table Y (e.g. in case of an integration between packages). The 4GL engine imports the primary key values of table Y from the parent session and stores them in the primary key fields of table Y of the browse list session.

In many cases you will have to re-program the parent session in such a way that the primary key fields of the main table of the browse list session are filled.

Consequences for programming in UI script:

Example

Example: (Browsing to Freight Service Levels from Warehousing Orders)

declaration:

table tfmfmd070

field.whinh200.serv:
before.zoom:
fmfmd070.serv = whinh200.serv
Note
Note: for purposes of clarity the example does not use integration DLLs, nor does it use start.session() to start the browse list.

Overriding Automatic Import

Automatic import only works when the browse list starts with the primary key. With dynamic index switching it is also possible to start the browse list with other keys. In that case automatic import can give wrong results.

Because of this and other reasons the application wants to override automatic import. The application might implement browsing as mentioned above at point 5. However the application can also choose to use zoom.* variables in these cases. (The name of these variables does not matter, however it is common practice to name them zoom.*).

Example:

parent session UI script

declaration:

extern domain tccom.bpid zoom.bpid

field.whinh200.stco: | Ship to BP
before.zoom:
zoom.bpid = whinh200.stco
browse list session UI script

declaration:

table ttccom111

zoom.from.all:
on.entry:
import("zoom.bpid", tccom111.stbp)
Example browsing to session with other than primary key (e.g. browsing to Business Partners by Parent Business Partner):

parent session UI script

declaration:

extern domain tccom.bpid zoom.bpid | BP id
extern domain tccom.bpid zoom.prbp | Parent BP

field.ppmmm999.bpid:
before.zoom:
attr.zoomindex = 2 | Start with index 2
zoom.prbp = ppmmm999.prbp
zoom.bpid = ppmmm999.bpid
browse list session UI script

declaration:

table ttccom100

zoom.from.all:
on.entry:
on case curr.key
case 1:
|* Automatic import
break
case 2:
import("zoom.prbp", tccom100.prbp)
import("zoom.bpid", tccom100.bpid)
break
endcase
Note that the start option of the browse list session can cause this not to work (e.g. when this is set to get.defaults). It is recommended to use the default start option instead.

Regards
__________________
//Bernd
Reply With Quote
Sponsored Links
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 19:44
Zoom Return field becks22 Tools Development 5 8th September 2010 15:03
How to call AFS in sp24? PV Ramone AFS/DDC/OLE: Function servers 4 2nd September 2008 11:06
Zoom and return vallue ICT Builder Tools Administration & Installation 0 4th May 2004 17:15
zoom to Menu trchandra Tools Development 6 2nd March 2002 01:39


All times are GMT +2. The time now is 14:48.


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