Sequence Number

HI

I have one form named proposal in that form i want to create the sequnce number after submitting that form:

say for example,. if i m submiting that form right now than the sequence number for that proposal should be 2006UAE01

if means UAE is depence on the country field on the form.

if there is another countryfield named “India” then it would like 2006IN01

so for every country the proposal number should unique

if i m submiting that form on 2007 for the same country UAE then it may be like 2007UAE01 , onwords

if some one submiting that form for year same country then format no of that sequence number would like “2007UAE02”

for that one i have one master form: in that form i m storing the code number(like DE) and value(GERMAN),.

can anyone help me in this regard using lotusscript:(WEB ONLY)

DEV

Subject: Sequence Number

This article talks about exactly what you are asking for

Subject: Sequence Number

Hi Dev,

I believe you can achieve the sequence number functionality in the webquerysave event of the form. by taking hold of the latest document by getentrybykey(year(now)&countryname).

BR.,

Naive

Subject: RE: Sequence Number

Yes and No …

If your application is on multiple servers, you have to take into account the possibility that multiple docs are being created relatively simultaneously on the different servers, and thus might get the same sequence number.

Even if on only one server, it’s possible to have this happen if the docs are created within some short time interval (1 second?) of each other. So it depends how important it is not to have any dupes.

You can have an agent run at night to clean up, but if it’s important to get your sequence number Right Now when you save the doc, then that’s harder. But yes, just have some view that holds these docs in an appropriate order and grab the top/bottom doc.

regards,

raphael