General information
Category:
Coding, syntax & commands
>>I have a table with a charater field called "ID_NAME". How do I set the index value and create a validation rule to check for uniqueness of ID_NAME. I want to display a custom error message when this rule is violated..
>>
>>Thanks,
>>
>>Bob
>
>Bob, if I understand your questions, then the index is simply on ID_NAME (INDEX on ID_NAME tag NAME). If you want the validation checked internally, set the NAME index to be PRIMARY. You can add your own validation function and message in the table designer.
>
>However, most of us (see many past threads) use an outside table which holds the last used (or next) Unique ID for each table. A function locks the record, increments the ID (by any function you choose) and then unlocks the ID table returning the new ID value. These IDs are NEVER part of any user-entered field. They are completely separate from the actual data.
>
>HTH
The SEEK command/function (5.0) supports listing the tag you want to use for searching without the need to actually change the order.
=SEEK(Value, "Alias", "IndexTag")
Steve
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only