×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

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.

Students Click Here

UNIQUE VALUE

UNIQUE VALUE

UNIQUE VALUE

(OP)
I am trying to right a formula that will force a field value to be unique if another field is equal to 'yes'

example:  if field1=yes, than field2 must be unique, else field2 can be any value.

Any help would be appreciated.

RE: UNIQUE VALUE

Simple method:

1) Go to Create, Join and select the database that contains field2. Click the "Alias" button and join the alias of the db to the original db using field2 in each db. If your db is named "Table", then you will have a Table:1 and a Table:2 to work with.

2) On the form where field1 is displayed, add a macro "on data change" of field1. The macro would be simple:

Check Field2
  RUN If(Table:1.field1 = 'Yes' and IsBlank(Table:2.field2) then end this macro, else continue this macro
  RUN If(Table:1.field1 = 'Yes' then continue this macro, else end this macro
  MESSAGE "Field2 is not unique", etc...
  SET Table1:field2 = '  (this would clear the field)
  TAB to wherever you wish...

Sue Sloan
http://www.xpertss.com

RE: UNIQUE VALUE

(OP)
thank you.  do you know of a good book that I can get to show me some of the more advanced techniques?

RE: UNIQUE VALUE

I wrote a book a while back. It does not cover anything about LotusScript, but it does cover a lot of Approach techniques. It is 660 pages and you can find it on XpertSS.com in the XpertSS Store.

Sue Sloan
XpertSS.com

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! Already a Member? Login


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