Jump to content
Server Maintenance This Week. ×

Last User to Modify in a relational db


Kay

This topic is 8663 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have 3 related files: (1) Projects, (2) Elements (which are the deliverables for each project), and (3) Tasks (which are the things that have to be done to accomplish each element).

To capture last-modified info, I am defining the following fields in each file:

LastModDate = Auto-Enter Modification Date

LastModTime = Auto-Enter Modification Time

LastModUser = Auto-Enter Modifier User

To capture true last-modified info in the Elements file, I am then:

LastModDateAll = If(LastModDate>Max(Tasks::LastModDate), LastModDate, Max(Tasks::LastModDate))

so that it also considers modification in the related Tasks records... and using similar logic for the last time modified. This works great.

But how do I ask for the last user that modified an element? This would be, in English, the user who modified the last-modified task within an element, or modified data in the element record itself. Certainly Max(Tasks::LastModUser) doesn't work and I was hopeful about Last(Tasks::LastModUser) but the Last function is for repeating fields, not related records.

With the same logic, I wish to be able to indicate of a whole project, who was the last user to modify anything in it of the project record itself, the elements within the project and the tasks within each element.

Any stab at an approach that might work would be appreciated. I am using FMP4 on a MAC.

Regards, K.

Link to comment
Share on other sites

Let me take a stab at it...

I reckon you're gonna have to have a cal field that works out and marks which record is the last modified. Then relate to that record and that is your user name.

How to do that... maybe use a calc field with a similar Max() function in each databse, or maybe a script of some kind?

Hope that helps!

Link to comment
Share on other sites

This topic is 8663 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.