Thanks. I having trouble and need more details to correctly modify the code:
Given:
table1
=====
last
first
employee_no
table2
=====
field1
field2
...
employee_name
...
fieldx
Working:
valuelists.ini for table2 contains:
[Last Name] (vocabulary for employee_name in table2)
__sql__ = "SELECT employee_no, last FROM table1 ORDER BY last"
The above correctly does what it does but does not sort by last name but employee_no when in list view.
Problem (to sort correctly):
The below goes in fields.ini for table2 under [employee_name] or [valuelistvalue] ?:
Using the example code as a template:
- Code: Select all
__sql__ = "select t1.*, t2.valuelistvalue from mytable t1 left join valuelisttable t2 on t1.valuelistid=t2.valuelistid"
I've gotten only this far:
- Code: Select all
__sql__ = "select table1.*, table2.valuelistvalue from table1 left join table2 on table1.valuelistid=table2.valuelistid"
Is something else also substituted or missing?
Do I create or place under :
[employee_name]
[valuelistvalue]
__sql__ = "select table1.*, table2.valuelistvalue from table1 left join table2 on table1.valuelistid=table2.valuelistid"
...
...
What am I missing?
Feels like the second week of Algebra I.
Thanks in advance.