Print Thread
Multicolum lookup fields
#3055 02/10/02 01:26 PM
Joined: Dec 2001
Posts: 5
Torino,,Italy
A
Angelo Offline OP
Member
OP Offline
Member
A
Joined: Dec 2001
Posts: 5
Torino,,Italy
I have a dataset with persistent fields, one of them is a lookup datafield defined as follow:

Field.LookupDataSet = dataset
Field.LookUpKeyFields = IDTIPOPROVA;IDTIPOSPROVA
Field.KeyFields = IDTIPOPROVA;IDTIPOSPROVA
(Names are equals but on different dataset)
Field.LookUpResultField = DESTIPOSPROVA

opening the form the result in a grid is correct, but when i click on the button to open the lookup list, I get an error dialog with the message 'Field "IDTIPOPROVA;IDTIPOSPROVA" not found '.
This appen on any row of the grid.

Someone can help me.
Thanks. Angelo

Re: Multicolum lookup fields
#3056 02/14/02 03:30 PM
Joined: Aug 1999
Posts: 22,217
Member
Offline
Member
Joined: Aug 1999
Posts: 22,217
I'm not sure why this doesn't work, but the only work around I know of is to compose the multiple keys into one field in the lookup dataset:

select key1 | | '.' | | key2 compound_key, description from ...

This way you have reduced it to a single key again. If you want to use this lookup to update a dataset that has a key1 and key2 field, then you need to decode the compound key again when the field is updated.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.029s Queries: 13 (0.009s) Memory: 2.4991 MB (Peak: 3.0421 MB) Data Comp: Off Server Time: 2024-05-14 07:31:44 UTC
Valid HTML 5 and Valid CSS