mohan05
24th February 2003, 13:09
Hi

I have display session containing employee code. I want to show the name of employee should appear on form corresponds to employee code. where can i write select statement or is another trick is there.

-Mohan

evesely
24th February 2003, 15:47
In your program script, put the select statement in a before.display section for the description field. For example, is the form field for the description is emp.dsca and the form field for the employee code is emno, then use something like:

emp.dsca:
before.display:
emp.dsca = ""
select tccom001.nama:emp.dsca
from tccom001
where tccom001._index1 = {:emno}
as set with 1 rows
endselect

kammie
27th February 2003, 15:35
When there is a reference from the employee field (in the main table of the session) to table tccom001, you only have to add the field 'tccom001.nama' to the form (no programming needed)