View Single Post
  #2  
Old 20th October 2019, 10:57
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,844
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox Tools 10.7 - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
query extensions

Hello,

try one of these, i.g. query.extend.where.
Code:
BaanERP Programmers Guide

Send feedback about the online Help to Baan Development 
Query extensions 
--------------------------------------------------------------------------------
Query extensions define conditions that the 4GL engine adds to the SELECT, FROM, and/or WHERE clauses of a database query in order to minimize the number of fields read from the main table and in order to retrieve all reference table fields required by the UI and/or DAL scripts. 

BaanERP provides the following functions for constructing query extensions: 

query.extend.select() 
query.extend.select.from.in.zoom() 
query.extend.from() 
query.extend.from.in.zoom() 
query.extend.where() 
query.extend.where.in.zoom() 
You can program query extensions in the UI script and/or the DAL script. In the UI script, you program the extensions in the before.program or before.zoom sections. In the DAL script, you program the extensions in the before.open.object.set() hook. 

For a full discussion of query extensions, see SQL Query extensions.
Example:
Code:
query.extend.where(" (tisfc001.osta = tcosta.in.prod or tisfc001.osta = tcosta.active)", EXTEND_APPEND)
Regards
__________________
//Bernd

Last edited by bdittmar : 21st October 2019 at 09:24. Reason: Example added
Reply With Quote