fgarcia
3rd September 2009, 23:48
:eek:

hello I am Fran from, I need a help of as using the following:
query.extend.from ()
query.extend.from.in.zoom()
query.extend.select()
query.extend.select.in.zoom()
query.extend.where()
query.extend.where.in.zoom()

if it is possible to send a code of example thank you :D

bdittmar
4th September 2009, 14:54
:eek:

hello I am Fran from, I need a help of as using the following:
query.extend.from ()
query.extend.from.in.zoom()
query.extend.select()
query.extend.select.in.zoom()
query.extend.where()
query.extend.where.in.zoom()

if it is possible to send a code of example thank you :D

Hello,

This is an example of a simple query extension programmed in the DAL for the main table 'qmptc015'. The unit (qmptc021.cual) of the algorithm (qmptc015.algo) must have the same physical quantity as the unit defined in the table (qmptc015.chun).


function extern long before.open.object.set()
{
query.extend.select("qmptc021.cual")
query.extend.from("qmptc021")
query.extend.where(":qmptc015.algo refers to qmptc021")
}

function extern long qmptc015.algo.check(long has_changed)
{
if has_changed then
tcibd.dll0003.read.mcs001.tccu(qmptc015.chun,
qmptc021.cual, basu.tccu, unit.tccu)
if basu.tccu <> unit.tccu then
dal.set.error.message("qmptcs011526")
|* Algorithm and characteristic units must have the
|* same physical quantity
return(DALHOOKERROR)
endif
endif
}

Regards

corozo2006
4th September 2009, 17:07
I don't need code of the DAL script i need code for ui script so much thank you

george7a
11th September 2009, 14:07
Hi,

Here is an example of a simple query extension programmed in the UI script taken from the manual (http://www.baanboard.com/programmers_manual_baanerp_help_functions_sql_query_extensions_example).

field.tejzw101.orno:
selection.filter:
query.extend.where.in.zoom("tejzw100.item = " & quoted.string(tejzw101.item))
| quoted.string() is used here, because the value of tejzw101.item might contain (double) quotes.

I hope it helps,

- George

P.S. You do not have to create a new user every time you log in ;). If you forgot the password you can ask for it and it will be sent to you via email.