Profile Document Sequential Number

Hi,

I use Profile Documents to create Sequential Numbering. I have a “Press To Sign” button on another form, and when the originator clicks on this button, it should get the sequential number and record it. I have a Computed when Composed field - seqnum, with value - seqnum, on this form.

Example of setting the seqnum, when clicking on the “Press To Sign” button.

**

TempWS:=@GetProfileField(“ProfileWS”;“counterWS”);

TempWW:=@GetProfileField(“ProfileWW”;“counterWW”);

TempDS:=@GetProfileField(“ProfileDS”;“counterDS”);

TempDW:=@GetProfileField(“ProfileDW”;“counterDW”);

TempWM:=@GetProfileField(“ProfileWM”;“counterWM”);

TempWB:=@GetProfileField(“ProfileWB”;“counterWB”);

TempBS:=@GetProfileField(“ProfileBS”;“counterBS”);

TempBM:=@GetProfileField(“ProfileBM”;“counterBM”);

@If(

type=“WS”;@Do(FIELD seqnum:=TempWS;@SetProfileField(“ProfileWS”;“counterWS”;TempWS+1));

type=“WW”;@Do(FIELD seqnum:=TempWW;@SetProfileField(“ProfileWW”;“counterWW”;TempWW+1));

type=“DS”;@Do(FIELD seqnum:=TempDS;@SetProfileField(“ProfileDS”;“counterDS”;TempDS+1));

type=“DW”;@Do(FIELD seqnum:=TempDW;@SetProfileField(“ProfileDW”;“counterDW”;TempDW+1));

type=“WM”;@Do(FIELD seqnum:=TempWM;@SetProfileField(“ProfileWM”;“counterWM”;TempWM+1));

type=“WB”;@Do(FIELD seqnum:=TempWB;@SetProfileField(“ProfileWB”;“counterWB”;TempWB+1));

type=“BS”;@Do(FIELD seqnum:=TempBS;@SetProfileField(“ProfileBS”;“counterBS”;TempBS+1));

type=“BM”;@Do(FIELD seqnum:=TempBM;@SetProfileField(“ProfileBM”;“counterBM”;TempBM+1));

“”);

**

When some users create a document, it gets the Sequential Number through the Profile Document, but it doens’t display it in the field - seqnum.

How is this possible. For some users it works, for others it doesn’t. Once someone created a document where the number isn’t displayed, it affects all new documents. No numbers are then displayed.

Subject: Profile Document Sequential Number

You may want (to find out what is happening) to have a field to display what the value of ‘type’ is becasue it seems like it is not in your list, therefore defaulting to empty.

I just had the problem of using Profile docs for sequential numbering and would highly advise against it. The problem didn’t appear when it was only me using the database, but once there were multiple users, it failed.

I switched to using just a regular document in a hidden view.

Subject: Profile Document Sequential Number

Hi Lieschen

Without seeing the rest of your code, it seems that your @If statement defaults to “” for those users who don’t get a seqnum …

In any case if you do search for Profile Documents in this forum, you’ll see over the years many people have had problems with them when trying to do things similar to what you’re doing.

The explantion from Lotus has been that profile documents where not designed for this sort of dynamic real-time action. Profile documents are cached in memory and are not always in sync with the disk version. Many people have reported that their numbers do not work out properly.

Eevn if you solve your problem, this method is going to give you problems anyway. I therefore suggest you read some of the other posts to the forum and use a different method.

YOu may wish to use normal documents and also use ‘document locking’ before writing the next number in the sequence back to your ‘config doc’. You’ll also need to make sure two new documents don’t read the same sequence number from your config doc.

Good luck

Bizhan

don’t use this method of generating sequence numbers at all.

Subject: Profile Document Sequential Number

This is over in the R4/5 forum, but you really want to read some of these.

Short story - profile docs are a bad choice for sequential numbering.

HTH

Doug

http://www-10.lotus.com/ldd/46dom.nsf/Search?SearchView&Query=profile%20and%20document%20and%20sequential&SearchOrder=0&Start=1&Count=100