Background Information:
Employee Table [E_Table] is related to Employee Deduction Table [D_Table]
Employee Deduction Layout has fields E_Table:employee_id;E_Table:name; D_Table:F_employee_id; D_Table: deduct_type; D_Table: deduct_amount;
D_Table has multiple records related to E_Table with F_employee_id
Question:
How can I show latest record from D_Table on Employee Deduction Layout and use such record in deduction calculations?
To show the record, use a one row portal and sort the portal to make the most recent record the first record.
To use data from this record in calculations:
1) specify the sort order in the relationship instead of portal set up and the most recently created record will be the first related record and the first record in even an unsorted portal.
or
2) Use the Last () function to access data from the last related record. (But read up on this one in help, there's a wrinkle here that might be an issue in some cases.)