jpadilla
22nd August 2002, 23:09
Hi,
I have a form where the user put the employee ID, I need to display the name for the ID employee as a display field.
How can I do this?? If the employee ID change, the displayed name should change too.
Regards
JP
klesch
22nd August 2002, 23:31
Roughly speaking:
field.<your_ID_field>:
when.field.changes:
(*** routine for filling <your_name_field ***)
display("<your_name_field">)
gfasbender
22nd August 2002, 23:48
I would use before.display section.
field.emp.name:
before.display:
get.emp.name(emp.id)
jpadilla
23rd August 2002, 00:32
I show in this file what I`m trying to do, the user gives the employee ID and the systems return the name.
How can I do this??
benito
23rd August 2002, 01:30
try this:
field.emno.nama:
before.display:
select tccom001.*
from tccom001
where tccom001._index1 = {:tihra907.emno}
selectdo
emno.nama = tccom001.nama
endselect
jpadilla
23rd August 2002, 01:47
thank you friends!!
now it`s working..
now I have a question, how can you assign which field must be fill in first by the user in a form??
mark_h
23rd August 2002, 04:24
Do you mean the field order on a form? Or do you mean to force the user to input a certain field first before they can input any other field? for the latter you could make the first field in the form mandatory. Then in the before.display on the other fields you could say something like:
if isspace(formfield1) then
attr.input = false
else
attr.input = true
endif
Good Luck!
Mark