[icf-dev] Adding company id to dynamic lookup/combo queries

Posted by LegacyUser on 29-Nov-2002 06:40

Hi,

In our application many lookup/combo lists are different for different companies.

In Dynamics V1 we used hidden company id's as parent fields for these dynamic lookups/combos.

In Dynamics V2 in some viewers hidden value does not always get value before lookup/combo is initialized.

Has someone made a solution where company id's are added to lookup/combo query when the temp-table is populated on server (lookupqp.p) ?

It would be nicer automatically add company id (like comp-id = 12) on the server and don't need to use always company as a hidden parent field in a viewer.

We have standard naming for company id's so it is easy to find out if the table has company id or not.

This method works very well for SDO's!

Best regards,

-Veli-Matti Korhonen

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

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

All Replies

Posted by LegacyUser on 29-Nov-2002 06:44

Hi Veli-Matti,

There are a couple of things you can try:

- in initializeObject of the viewer, build the BaseQuery string to include the company ID. This would need to be done in each viewer.

- move the above code into a super procedure which can be associated with the viewer

- create a super procedure (or modify lookupcustom) which figures out, based on a token or the lookup name or some other criterium, that it should have the company ID in the particular lookup's query. You may find that you need to add a new property to support this. You say "We have standard naming for company id's so it is easy to find |out if the table has company id or not." so it may not benecessary to have a new property.

I would suggest that you log an issue which allows the use of tokens and/or functions in the query that is built by the lookup.

HTH,

Peter

|-Original Message-

|From: Veli-Matti Korhonen

|Sent: Friday, November 29, 2002 1:41 PM

|To: icf-dev@possenet.org

|Subject: Adding company id to dynamic lookup/combo queries

|

|

|Hi,

|

|In our application many lookup/combo lists are different for

|different companies.

|

|In Dynamics V1 we used hidden company id's as parent fields

|for these dynamic lookups/combos.

|

|In Dynamics V2 in some viewers hidden value does not always

|get value before lookup/combo is initialized.

|

|Has someone made a solution where company id's are added to

|lookup/combo query when the temp-table is populated on server

|(lookupqp.p) ?

|It would be nicer automatically add company id (like comp-id =

|12) on the server and don't need to use always company as a

|hidden parent field in a viewer.

|We have standard naming for company id's so it is easy to find

|out if the table has company id or not.

|

|This method works very well for SDO's!

|

|Best regards,

|-Veli-Matti Korhonen

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

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

Posted by LegacyUser on 29-Nov-2002 08:23

Hi Peter,

Thank you for this! I think it will help.

I will test adding this to viewercustom procedure.

I must use now naming for the combo because otherwise I must make an AppServer call to find out if combo table has company-id or not.

You are right that if there were token for combo or lookup to tell that it has company it would solve this problem.

My idea first was just to add company-id to the query on server when temp-table is populated. There I could look from the db-table if there is a company id or not and there would not be a need for this token.

Best regards,

-Veli-Matti

Lähettäjä: "Peter Judge" Päiväys: 2002/11/29 pe PM 02:44:10 GMT+02:00

Vastaanottaja: ,

Aihe: RE: Adding company id to dynamic lookup/combo queries

Hi Veli-Matti,

There are a couple of things you can try:

- in initializeObject of the viewer, build the BaseQuery string to include the company ID. This would need to be done in each viewer.

- move the above code into a super procedure which can be associated with the viewer

- create a super procedure (or modify lookupcustom) which figures out, based on a token or the lookup name or some other criterium, that it should have the company ID in the particular lookup's query. You may find that you need to add a new property to support this. You say "We have standard naming for company id's so it is easy to find |out if the table has company id or not." so it may not benecessary to have a new property.

I would suggest that you log an issue which allows the use of tokens and/or functions in the query that is built by the lookup.

HTH,

Peter

|-Original Message-

|From: Veli-Matti Korhonen

|Sent: Friday, November 29, 2002 1:41 PM

|To: icf-dev@possenet.org

|Subject: Adding company id to dynamic lookup/combo queries

|

|

|Hi,

|

|In our application many lookup/combo lists are different for

|different companies.

|

|In Dynamics V1 we used hidden company id's as parent fields

|for these dynamic lookups/combos.

|

|In Dynamics V2 in some viewers hidden value does not always

|get value before lookup/combo is initialized.

|

|Has someone made a solution where company id's are added to

|lookup/combo query when the temp-table is populated on server

|(lookupqp.p) ?

|It would be nicer automatically add company id (like comp-id =

|12) on the server and don't need to use always company as a

|hidden parent field in a viewer.

|We have standard naming for company id's so it is easy to find

|out if the table has company id or not.

|

|This method works very well for SDO's!

|

|Best regards,

|-Veli-Matti Korhonen

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

This thread is closed