R5 - How to avoid duplicate data entries
R5 - How to avoid duplicate data entries
(OP)
I'm fairly new to lotus script. I have one field that is Type and the other field that is Week. Type data would be Group and Single and the Week would be 5/21/2007 or 5/28/2007, etc. How can i prevent a user from entering in data in the Type field (ie) Group more than once per week? Like 5/21/2007 would have Group once and Single once. And if they tried to enter either of those again for the same week it would give them an error message? I know this isn't an easy request but could really use some insight.
Thank you in advance for your help. It is muchly appreciated!
Thank you in advance for your help. It is muchly appreciated!
RE: R5 - How to avoid duplicate data entries
If you use one document per week, all you need is a hidden view categorizing docs per user and per week, then use that view to lookup if a doc exists for the given week. If it does, block saving until the user inputs a proper week date.
If you hold more than one week of info in the document, then the solution will be more complex, but will most likely involve checking the dates already in the doc and blocking same-date input via Script.
So, how many weeks of data does your report doc hold ?
Pascal.
I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
RE: R5 - How to avoid duplicate data entries
RE: R5 - How to avoid duplicate data entries
The key should be equal to the text of the date (no time info), plus the user name. That should make the key unique.
For every document, create the key above in a hidden field at the bottom of the document. Use that field to display in the hidden view. The advantage of this is that, when saving a new document, you can just do a lookup in the hidden view for the key value. If you find it, then you can block the save because the document already exists.
Pascal.
I've got nothing to hide, and I'd very much like to keep that away from prying eyes.