Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Increment count?

Status
Not open for further replies.

yim11

MIS
Jun 26, 2000
35
0
0
US
Hello,
I am working on a field that I need to start and increment a count. More specifically:
I have a field called 'Evaledby' where a persons initials are entered when they are assigned to an evaluation. What I'm trying to do is add a day count next to that field...so that when a persons initials are entered the count starts at 1 and increments one every 24 hours until a date is entered in to another specific field [the completion date field].

It's the Notes syntax that's confusing me, specifically the @if syntax.

If anyone can help or point me to some resources that can, I would be very thankful.

TIA,
-jim
 
try something like:

Define Globals at Event Declarations

TimeOpen# = 0
Dim ElapsedTimer as New NotesTimer(86400)

Define Globals at Event Initialize

ElapsedTimer.Enabled = False
On Event Alarm From ElapsedTimer Call Counter

Define Globals at Event <Counter>
TimeOpen# = TimeOpen#+1

set a formula on your form that turns on the counter.
@if(evaledby!=&quot;&quot; & completed=&quot;&quot;;ElapsedTimer.Enabled = True; ElapsedTimer.Enabled = False)

This will give you full 24 hour increments from the time the evaledby field is entered until the &quot;completed&quot; field is entered.

If you want the actual time elapsed then make both field computed and use the TimeDifference method of the NotesDateTime class (this is Java)
 
Thanks for your response.
I think I maybe in over my head on this one. Lotus has no documentation on Define Globals at Event Initialize, so I may have to outsource or scrap this one.

Thanks again!!
-jim
 
Sorry..

When you create a field (such as evaledby) look at the design pane. You'll have two drop down boxes. Design and Event. In the case above select Globals in the design list and the appropriate event ie initialize, declarations or the counter, once you create it.

In the white space type or copy the code for each listing.

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top