Title
Order calculation script trigger by date (or last entry)?
Post
HI there,
I have a field called "location" for my inventory, and also aocation history. The location field runs a script trigger on save that first of all goes to the field "location history" and then runs "(ARTWORK::LOCATION) & " - " & Get ( CurrentDate ) & ¶"
First of all, is this the cleanest way to do this? In order keep track of the history of movements in a stock item?
Secondly, how do you order it so the latest entry in the history goes to the top of the field?
Better to make each entry into a different record of a related table. Think in terms of a portal where one field in the row is a date field and the other field in the row is a location field. A third field would be a match field that matches by location ID. You can then sort either the portal or its relationship by the date field in descending order to sort the most recent location to the top of the list.
(This could be done with a large text field, but that's not nearly as effective a way to manage this data as can be done with a related table.)