ajayz

Form sorting only latest updated record

Discussion created by ajayz on Aug 28, 2017
Latest reply on Aug 28, 2017 by mikebeargie

I have been asked to write a new form layout that shows heading information for employees and only the latest updated salary information.

 

The Parent table named Employee_table holds the employee names / office / function etc data

'

The Salary table has a foreign key linking the employee table. This table hold their salary, bonus, and a last modified timestamp.  Most user may have 1 to 7 records depending on how long they have been employed with the company.

 

The form needs to only show the last modified salary record, not all salary update records.

 

I've created a from layout based on the Salary table,  added a sum summary field to show the employee name and office and function and in the body I have salary updates.   (all 1 to 7 updates)

 

ie.

 

John Smith - NSW - Sales department

         Id_Salary modified timestamp. |  Salary | Bonus

         Id_Salary modified timestamp. |  Salary | Bonus

         Id_Salary modified timestamp. |  Salary | Bonus

         Id_Salary modified timestamp. |  Salary | Bonus 

 

Neil Baker - NSW - Sales department

         Id_Salary modified timestamp. |  Salary | Bonus

         Id_Salary modified timestamp. |  Salary | Bonus

 

 

I only want to see the last modified salary update:

 

John Smith - NSW - Sales department

         Id_Salary modified timestamp. |  Salary | Bonus

 

Neil Baker - NSW - Sales department

         Id_Salary modified timestamp. |  Salary | Bonus

 

etc

 

How to I filter out all other salary updates to only show the last modified record (the dates are all different)

Outcomes