Solved

Date stamp on a field

Posted on 2002-05-10
20
330 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
  • 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
 
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now