Reputation: 85
good day every one.
what are the effect of re-cache if i use it to my updating data? This is what i trying to do, but i need to know what will happen if i replace the no-cache to re-cache
i will explain the idea,
in this textbox it will call the last digit in my database and add 1, but i figure out that there is a problem in this, if multiple user using this form there are possibility that the number will duplicate.@If(@IsNewDoc;@Elements(@DbColumn("":"nocache";@DbName;"GPA";1))+1;@Return(GPnum))
my thought guide me in this path, if i use @dblookup to find if there is a duplication in my number but, i dont make it thru .
Upvotes: 1
Views: 274
Reputation: 14628
Recache will not help you avoid duplicates.
You are trying to increment a counter in Lotus Notes to create a unique sequential identifier for documents. This is a problem that has been discussed many times, by many people, for at least 20 years. You can find good information here in StackOverflow and in various other forums, blogs, and articles. The two approaches that work are
@Unique
function instead. Documents will have a unique code instead of a unique number.Please see this answer, and this answer, and this article.
Upvotes: 2