Solved

Date stamp on a field

Posted on 2002-05-10
20
334 Views
Last Modified: 2013-12-18
Hello Notes Expert,

It has been a long time since I have posted a question regarding notes but this one is out of my reach.  I have a field on a form where technology officers can approve a request by a system users.  I have a radio button field where approvers can click either new, pending, approve and deny.  

I need a formula/script for a field that will capture the date when an officer only selects APPROVE.  

Also the approver field is always valued.  When the form is intially created the approver field reads new and when they click on submit the field value moves to pending.  At that point the officer can choose to either approve or deny the request.  

As a reminder, I need a script or formula for a field that can capture the date for when the approver clicks approve.  I hope that explains my problem.

Thanks
Samir  
0
Comment
Question by:SamirKumar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 6
  • 5
  • +1
20 Comments
 
LVL 13

Expert Comment

by:CRAK
ID: 7002200
A simple @Now or @Today?

E.g. in a button:

Field Status := "APPROVE";
Field Dt := @Text(@Today);
@Command([FileSave])
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7002384
Hey Samir !

Make it a computed field of DateTime datatype and have its formula as @Now

Thats it !

Whenever the document is edited and saved this date and time will change.

You can infact label it as "Last Edited Date/Time"
Optionally you can have another field that says, "Last Edited By" and have a Text computed field with a formula as @Name([CN]; @UserName)

By keeping these two fields, you will know who the last person edited this document and at what date and time.

Good Luck!
Arun.
PS: Welcome back buddy!
0
 

Author Comment

by:SamirKumar
ID: 7017100
I will test out the solutions this week cause I am done with finals!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Accepted Solution

by:
zvonko earned 50 total points
ID: 7027187
Hello boys,

both answers are not complete.

Here my proposal.
Because you have not stated what the name of your radio button field is, I named it: RadioButton

So place please this formula into forms QuerySave event:
FIELD RadioButton:=RadioButton;
FIELD ApproveTime:=ApproveTime;
@If((ApproveTime="")&(RadioButton="approve");@SetField("ApproveTime";@Now);"")

This way is your approval done only one time (not on every save operation and not on every button click; why button?).

This formula does not erase the ApproveTime field after approver reverts his decision the change the approval to something else. Do you like to handle this exception too?


0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7028288
You know what ? Samir is my buddy and he is going to offer me all the points with an "A" ..

Who wants to bet ?

;-)
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7028403
Should I ask him to increase the points for me <|:-)

0
 

Author Comment

by:SamirKumar
ID: 7029825
I have a field below which reflects the managers status but I use action buttons to make it easier on them.  In this application, managers do not revise there selection and they can either choose approve or deny.  So basically, I need a field that will just capture when the status field equal approve.  The date stamp will just reflect the date when the field was marked approve.  

My goal is to subtract that date from the date the document submitted by the users but for now the date stamp will be fine.

Thanks
Samir
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7030509
okay you have some code behind the approve button right ? And after approve you hide this button. Correct me if i am wrong.

Use that button to set another field called approved date.
And use @SetField("ApprovedDate" ; @Now). Thats it.

Let this field be of datetime type and computed with the value of ApprovedDate (the field name itself)

Hope this is fine for you right ?

If u still have troubles send the db to arunkumar@rocketmail.com and i will do something for you and send it back okay ?

All i want you to do is give the points to me and not to my brother Zvonko !

|-)
Arun
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7030523
I am sorry but my solution was for a RadioButton :(

ActionButtons are much simpler: one action and one result; no decision :-)
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7030526
See !

Zvo knew that Samir and Arun are buddies he gave up !

;-)
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7030543
Not really Arun, I know that for really hard nuts Samir trusts me; simple peanuts done by buddies <|:-)

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7030550
Well...i am confused now.

Which nuts are you talking about ?

;-)
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7030562
I think for example about Excel ****s :)
0
 

Author Comment

by:SamirKumar
ID: 7032745
I will test the solutions after the long weekend.  
Another question (yes/no) is it possible to create an agent that will take values of response documents and put them back on the parent document.  I want to consolidate an application from having response docs to single docs.  I just need an agent to convert the data, don't want to loose it.....

yes will be fine and if yes I will post the question for large points....

Large enough nut for you guys?
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7032771
My answer is: YES, it is possible.

0
 

Author Comment

by:SamirKumar
ID: 7033142
If it is possibe, how hard is it to implement on a 3000 documents?  

I am assuming I would have to create fields on the main form to import the values from the response documents.

Also, I liked Zvos' answer to this problem, the querysave formula is most efficent cause it takes care of the button and field.  

As stated earlier, I will test this out on Tuesday but that does seem to be the best solution......

Samir



0
 
LVL 10

Expert Comment

by:zvonko
ID: 7033239
Without near looking I would say 3000 documents are never a problem for an agent :-)

To give you a good example for such an agent I would need some details.
1.) Are all response documents of same type (same Form, same Fields)?
2.) Are there response to response documents to handle?
3.) Do field and item names produce a collusion? Are there same items in parent and response documents beside the internal fields?
4.) Have field names at transfer time to be mapped to new names or be prefixed?

Do you prefer LotusScript or @Functions agents?

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7033425
Get a collection of all the 3000 documents and use NotesDocumentCollection.StampAll

This goes just like that !

;-)
0
 

Author Comment

by:SamirKumar
ID: 7045040
Simple solution for a simple problem.

This works great and now I can subtract dates to track requests.  

I guess I was thinking beyond the scope of the problem.

Good Job,
Zvo
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7045101
Thanks Samir :-)

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question