If that's really all you need, then you can create an OnObjectModify script trigger for your "status" field, that both changes the current status date, and records the transaction to a separate updates table.
That script would look something like this:
Set Variable [ $status ; records::status ]
Set Variable [ $id ; records::id ]
Set Field [ records::status date ; get(currentdate) ]
Go To Layout [ transactions ]
Set Field [ transactions::date ; get(currentdate) ]
Set Field [ transactions::status ; $status ]
Set Field [ transactions::recordID ; $id ]
Go To Layout [ original layout ]
Refresh Window [ flush join results ]
Using the above, you could then use a portal of "transactions" on your "records" layout to show the list of historical changes. You could also sort the relationship between the two tables so the most recent is at the top.
Does this make sense?
I do a bit of "behind the scenes" audit trail very simply...
I don't need to interact with the log...I just need it in case there is a question of "who did what" later...
Each of the fields of interest has an OnObjectSave script trigger on it that runs:
SetField (Table::ModificationLog ; Table::ModificationLog & PP & Get(AccountName) & Get CurrentHostTimestamp) & Get(ActiveFieldName) & Get(ActiveFieldContents) & RecordID
It just appends the existing list in a field that is not even on the layout (but is in the same table).
PP being the CR symbol...
If you want it in a portal, Mike's way will give that to you.
Your the MAN !!!
Variables always mess with me.
I was close
You can do some cool stuff with variables, good to hear you were close. It always helps as well to post an example of what you're already working with if you can.
Thanks for your help Mike,
Ok, now PLEASE help me find this bug in the script.
It is working as intented, except the Facility field is overwriting all previous entries as if it were a Universal Field,
which it is not. I am using a Script Trigger on the, Facility, Status, Department and Location fields, all of which trigger the same script.
Here is my script and a screen shot of what I am trying to make.
All of the other fields are working properly.
Two things, you don't have a commit statement after all the set fields, and the script shows as modified, but you haven't saved the script.
Are you saying that the facility field in the portal shows the same data for all records?
You are possibly displaying faculty from the primary table rather than the related table.
thanks for pointing out my Facility Field issue.
it was the wrong table,
I was so wrapped up in it that i just didnt see it.