INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

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!

RE: R5 - How to avoid duplicate data entries

Question : are you using one document per week, or is your document recording more than a week's worth of data ?

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

(OP)
Yes, it's only one doc per week...on-going.

RE: R5 - How to avoid duplicate data entries

Easier to check then. Make a hidden view that lists docs with a key - sorted.

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close