Multicolum lookup fields

Angelo

Member
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
 
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
 
Back
Top