Dynamic Valuelists /Display combination of 2 tables

A place for users and developers of the Xataface to discuss and receive support.

Postby sym » Tue Jun 27, 2006 6:00 am

I would like to add some information of one table to another table:

table1: [EMPLOYEES_BUSINESS]
EMPLOYEE_ID ; EMPLOYEE_FIRSTNAME ; EMPLOYEE_MIDDLENAME ; EMPLOYEE_LASTNAME ; EMPLOYEE_ROOM

212 ; Jan ; van ; Geffen ; 0.014
10913 ; Jan ; van ; Schaijk ; 0.014


table2: [EMPLOYEE_ROOM]
ROOM_ID ; EMPLOYEE_ROOM ; EMPLOYEE_DESCRIPTION

1 ; 0.014 ; xxxx xxxx xxxx xxxxx
2 ; 1.009 ; yyy yyy yyy yyyy yyy


I would like table EMPLOYEE_ROOM display as:

Room-Persons ; EMPLOYEE_ROOM ; EMPLOYEE_DESCRIPTION

Geffen van, Jan / ; 0.014 ; xxxx xxxx xxxx xxxxx
Schaijk van, Jan

Is this possible with the valuelists.ini definition file ?
I tried a few combinations... but i didn't get it fixed.

Greetings Nico Sijm
sym
 
Posts: 13
Joined: Wed Dec 31, 1969 5:00 pm

Postby sym » Tue Jun 27, 2006 6:36 am

I tried:

[EMPLOYEES_BUSINESS]
__sql__ = "SELECT EMPLOYEE_ROOM, CONCAT(EMPLOYEE_LASTNAME, ' ',EMPLOYEE_MIDDLENAME,',', EMPLOYEE_FIRSTNAME) as FullName FROM EMPLOYEES_BUSINESS WHERE EMPLOYEE_ROOM = '$EMPLOYEE_ROOM' ORDER BY EMPLOYEE_LASTNAME"

But no output...
sym
 
Posts: 13
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Jun 27, 2006 7:25 am

Hi,

Valuelists, unfortunately are not dynamic. The problem with your query is that it includes a variable '$EMPLOYEE_ROOM'. This will get rendered as ''.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: Google [Bot] and 13 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved