I want to store the ID value of reference table to another table but i want the form to display the actual name instead of the ID number.. For example, I want store the department ID on an employee table but on the employee card it should display the name of the department.. Any idea please?
0
Comments
But you should try avoiding using this at the list form, as it may degrade performance. It also cannot be used for filtering data.
Hope this helps.
Thanks
If it's store seperately
ID -- Name
1 -- Some Name
2 -- Some Other Name
then the flowfield would look like
Method=Lookup
Table=table that has the ID name & Code
Field = Id Name
Table Filter= ID Code = Salesperson.ID Code
http://www.BiloBeauty.com
http://www.autismspeaks.org
http://www.BiloBeauty.com
http://www.autismspeaks.org
1) Normal field, DepartmentID, type = the type of the field in the department table.
2) Flowfield, DepartmentName with CalcFormula = Lookup(Department.Name WHERE (ID=FIELD(department_ID)))
On the form reveal both fields. When the user fills the departmentID field the DepartmentName field is calculated Automatically.
After that, if you want you can remove the department_ID from the form and create some lookup code on the OnLookup code of that field that will actually fill the DepartmentID field..
Ok should this be on the employee table? Am i going to create another field called DepartmentName on the employee table? Because i only want to store the ID on the employee table and yet display the departmentname on the card.
dept.get("department id");
deptname := dept."department name";
on onAfterValidat() trigger.
My problem is if i move to the next employee the departname does not change unless i select it again. Is there any possible way that the text field moves whenever i clicked on the next employee?