Grace Cheong
13th July 2011, 10:48
Hi,

I would like to get your help how to do the data filtering in query.extend.where including the enum value?

I create a ropdown list that contains of Warehouse Order number.
When user select Origin(whinh200.oorg) & Transaction Type(whinh200.ittp), dropdown list should be only display the Warehouse Order number according to both selections.

It got erros after few times of trying:

domain whinh.oorg origin
domain whinh.ittp TransType


1st try:
query.extend.where.in.zoom("whinh200.oorg = " & quoted.string(origin) & quoted.string(TransType)) --- Failed

2nd try:
Origin_Desc = enum.descr$("whinh.oorg",Origin)
TransType_Desc = enum.descr$("whinh.ittp",TransType)

query.extend.where.in.zoom("whinh200.oorg = " & quoted.string(Origin_Desc) & " and whinh200.ittp = " & quoted.string(TransType_Desc)) --- Failed


3rd try:
Str = Str$(Origin) --- This return value in zero '0'

query.extend.where.in.zoom("whinh200.oorg = " & origin) --- Failed


Anyone can tell me how to data filtering in query SQL based on enum value?

Thanks.


Best Regards,
Grace

MilindV
13th July 2011, 11:21
Try this,

query.extend.where.in.zoom("whinh200.oorg = " & str$(etol(origin))
& " and whinh200.ittp = " & str$(etol(TransType))

rahul.kolhe22
13th July 2011, 11:50
Hi,

May be you can even give a try to this one

query.extend.where.in.zoom("whinh200.oorg = :origin and whinh200.ittp = :TransType"


assuming that variables orign & TrasnType are declared as extern.

Regards,
Rahul

Grace Cheong
13th July 2011, 13:24
Hi all,

Appriciated your responed, it's works!
Thank q so much! :)

Best Regards,
Grace