AnsweredAssumed Answered

Showing last record while entering new record

Question asked by LarsChristensen on Sep 18, 2013
Latest reply on Sep 23, 2013 by philmodjunk

Title

Showing last record while entering new record

Post

     Hi,


     I'm trying to configure my system to be able to show the last record in a table while entering a new record in the same table.

     The record that I want to be shown is the latest one, preferably based on a date field, but this isn't alfa omega, it could alternatively be based on the creation date of the record if this is easier.

     I have a table for each of Clients, Plants and Operations. Each client has several plants, and at each plant several operations are performed.

     When I enter a new operation, I would like specific data fields from the last operation performed at specified Client and Plant to be shown alongside the record currently in creation. 


     I tried creating a new table occurrence of Operations (Operations 2) relating them via Client ID and Plant ID and then adding a portal to the original one in order to show data from the new one, but this isn't possible at all. I can't even create one to show data from the Clients or Plants tables in the Operations table.

     Now I've setup calculation fields for each field I want to be show and set them to calculate for example, Last (Operations::volume), and set to calculate in the context of Operations 2.

     This seems to be working, but I have a feeling that it's is a really bad workaround that might come back and bite me as the database gets more and more complex, and I have a feeling that I'm trying to find the forest through the trees.

     Do you guys have any suggestions for a more simple and clean way of doing this?


     Thanks!

Outcomes