weird behavior from a lookup

LabKey Support Forum (Inactive)
weird behavior from a lookup Ben Bimber  2010-12-16 10:33
Status: Closed
 
We have a query where one of the columns is a lookup to a different query. The target of this lookup is called lookups.rooms, where lookups is an external schema. The lookup is defined using this XML:

                    <column columnName="room">
                        <displayWidth>40</displayWidth>
                        <fk>
                          <fkFolderPath>/wnprc/ehr</fkFolderPath>
                          <fkDbSchema>lookups</fkDbSchema>
                          <fkTable>rooms</fkTable>
                          <fkColumnName>room</fkColumnName>
                        </fk>
                    </column>

If I go to the schema browser, this lookup is reported as:

lookups._select.room (room)

note that it uses '_select', instead of 'rooms'. in the schema browser, this lookup appears to resolve correctly (because it shows the expandable plus sign, and it shows the columns present in lookups.rooms). the problem is that the metadata returned by selectRows() reports the lookup target as '_select'. Therefore combo boxes and anything else that tries to resolve that lookup throws an error, because the table lookups._select doesnt exist.

Is there an explanation for why this might be happening? I've tried clearing the cache, but that did not change it. Thanks in advance.
 
 
jeckels responded:  2010-12-16 11:13
Hi Ben,

What type of query (list, dataset, custom SQL, etc) are you setting the lookup on?

Thanks,
Josh
 
Ben Bimber responded:  2010-12-16 11:16
hi josh,

the starting query is called demographicsCurLocation, which is custom SQL. It has a column called 'room', that points to lookups.rooms, which is also custom SQL.

In other places I have successfully pointed a lookup at custom SQL (as opposed to a built-in table), so I would have expected this to work.

thanks.