Expiration

I want to have an expiration date in my forms for example the date of forms was open is today and after 15 days the user can’t use the system because the system is alread expired how can i solved this can i have a code of this situation…

Im a beginner of using this kind of software

help me…

thanks…

Subject: expiration

You say you want an expiration date in your forms, I suppose you mean an expiration date in your documents. I cannot imagine you want a certain form not available after some time.

And what do you want to stop? The user from editing the document? In this case have a look at the Querymodechange event and set Continue to false when the lastmodified date is too far in the past.

Subject: RE: expiration

yes that is i want the code using a lotus script please help me. thanks for that i’ll wait for the code… thanks

Subject: RE: expiration

… i’ll wait for the code…

Maybe will you are waiting you might want to read Domino Designer Help or better yet try some coding and see where you get. Ad take a look at the LotusScript debugger - it can show you lot of good stuff.

Subject: RE: expiration

This is the coding:

Sub Querymodechange(Source As Notesuidocument, Continue As Variant)

Dim doc As NotesDocument

Dim docdt As NotesDateTime

Dim nowdt As NotesDateTime



Set doc = Source.Document

Set docdt = New NotesDateTime(doc.LastModified)

Set nowdt = New NotesDateTime("Today")

Set modifiedDateTime = New NotesDateTime( "" )

Call nowdt.AdjustDay(-14)

If nowdt.TimeDifferenceDouble(docdt) > 0  Then

	Continue = False

End If

End Sub

I have set the check value fixed to 14 days, but you can set that to any value you like.

An advice: have a look at the Designer’s Help database. This help-file contains much information, also for beginners, since there are many samples.

Subject: RE: expiration

This is line can be removed from my sample code:

Set modifiedDateTime = New NotesDateTime( “” )

Subject: RE: expiration

thanks for the help…