RE: [icf-dev] Adding buffers to a static SDO at runtime

Posted by LegacyUser on 26-Mar-2003 02:36

Hi Martin,

The setAddQueryWhere() function has a parameter that allows you to specify the buffer to which the join criteria is to be added. It is documented in the help somewhere. I haven't tried manually playing with the query when there are buffers though but I would think that the code would work OK.

Regards,

Peter

|-Original Message-

|From: Martin Bos

|Sent: Wednesday, March 26, 2003 9:38 AM

|To: 'dev@icf.possenet.org'

|Subject: Adding buffers to a static SDO at runtime

|

|

|Hi,

|

|I am using dynamics 1.1A (still) and I want to achieve the following:

|

|For example: I have an static SDO with the following query:

|

|FOR EACH table1,

| EACH table2 WHERE table2.table2_obj = table1.table2_obj,

| EACH table3 WHERE table3.table3_obj = table1.table3_obj,

| EACH table2b WHERE table2b.table2b_obj = table2.table2b_obj

|

|The fields in the rowobject come from these 4 tables. Most of

|them are not-updateable.

|

|Now: I want to adjust the query at runtime just before the

|openQuery in the following way: I want to insert a variable

|number of buffers in front of the query, so that the query becomes:

|

|FOR EACH inserted_buffer1 WHERE inserted_buffer1.field = "criteria1",

| EACH inserted_buffer2 WHERE

|inserted_buffer2.foreign_obj = inserted_buffer1.foreign_obj

| AND inserted_buffer2.field =

|"criteria2",

| EACH inserted_buffer3 WHERE

|inserted_buffer3.foreign_obj = inserted_buffer2.foreign_obj

| AND inserted_buffer3.field =

|"criteria3",

|/* now the original query */

| EACH table1 WHERE table1.table1_obj =

|inserted_buffer3.foreign_obj,

|/* inner join with inserted buffers */

| EACH table2 WHERE table2.table2_obj = table1.table2_obj,

| EACH table3 WHERE table3.table3_obj = table1.table3_obj

|OUTER-JOIN,

| EACH table2b WHERE table2b.table2b_obj =

|table2.table2b_obj OUTER-JOIN

|

|

|Note: the number of inserted buffers is variable (0 - 10) and

|they all point to 1 table.

|Note: these inserted buffers are actually a kind of

|filterfields. By joining these inserted_buffers via an

|inner-join I can force an AND condition for: criteria1 ,

|criteria2 and criteria3.

|Note: None of the fields of the inserted_buffers is used on

|the ROWOBJECT table.

|

|

|How can I adjust the query this way in a static SDO ?

|

|Best regards,

|Martin Bos - mailto:martin.bos@cargomate.com

|CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL

|tel. +31(0)30-6048811 - fax +31(0)30-6090000

|-<http://www.cargomate.com/|CargoMate - Global Logistics

|Software Solutions

|Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles

|

|

|

|

|To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

|For additional commands, e-mail: dev-help@icf.possenet.org

|

|

To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

For additional commands, e-mail: dev-help@icf.possenet.org

All Replies

This thread is closed