Gossamer Forum
Home : Products : DBMan : Customization :

time question

Quote Reply
time question
Hi all, I have one timestamp field working fine on the modification page. Now what I want to do is that I have two groups of users, User A and User B. I would like to have a timestamp for User A whenever User A modify's a record, and another timestamp for User B whenever User B modify's a record. So basically two timestamps, one for User A, and another for User B. User A cannot change timestamp of User B and User B cannot change the timestamp of User A.

Any help would be really great.

Thanks
Quote Reply
Re: [kothi] time question In reply to
Please, need help!
Quote Reply
Re: [kothi] time question In reply to
You may need to provide more information as far as your setup to allow more than 1 person to modify a record. Are you using the permissions mod to setup user A and B or do these people both just have admin rights?

Have you searched the forum or FAQ for "timestamp" or "modify record" to see if you could find a solution? I'm pretty sure Kellner provided some coding awhile ago for something similiar to what you are trying to do.

There are instructions for adding a field for who last modified a record but this would just add the user who last modified the record:

If you have a field called "LastModifiedBy"

In html.pl, sub html_modify_form_record, just after the line that starts with

if (!%rec) { &html_modify_failure(

add

$rec{'LastModifiedBy'} = $db_userid;

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] time question In reply to
Hi, yes i'm using permission mod for User A and User B. They can view, modify and logoff. Basically, I have two timestamp fields in default.cgi. "Time_Stamp1" for user A and "Time_Stamp2" for user B and default value is set to &get_time. What I want to do is, whenever user A modifies a record, it should get the current time and store it in "Time_Stamp1" and whenever user B modifies the same record, it should get the current time and store it in "Time_Stamp2" leaving the "Time_Stamp1" field without changing it. But for some reason, it is just storing only by the user who has last modified it. I have looked over other sites for help, but it wansn't quite helpful. Basically, I want two different time stamps for a particular record.


Thanks
Quote Reply
Re: [kothi] time question In reply to
This is the thread which I thought provided the solution but it was just for tracking the last modified, but it has references to code for tracking all modifications.

http://www.gossamer-threads.com/...e=kellner&mh=150

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/