Mickdn Posted August 11, 2010 Posted August 11, 2010 Having a brain fade here, need a calculation to check a field called "Trips" so that no Trip Name is the same. I no I can use the validate option in the field options but it's cryptic message is not much good to a user. I like to attach the script to a Script Tigger. Many Thanks
RodSierra Posted August 11, 2010 Posted August 11, 2010 but it's cryptic message is not much good to a user. Many Thanks FYI, you can check the box at the bottom of the validate window and write your own error message, its much easier to use the built in features if all you need is a custom message.
comment Posted August 11, 2010 Posted August 11, 2010 You could use a self-join relationship matching on Trip Name and count the related records. However, relying on a script trigger alone to ensure data integrity is not the best practice. In version 11 you can have the best of both worlds by triggering the script OnObjectValidate.
Mickdn Posted August 11, 2010 Author Posted August 11, 2010 Thanks for the quick replys, I know about the Message box, but I want to script it after the duplicate is typed in, such as: Field "TripName" if a user types in the name of a trip that already exists, then Tabs out of the field, I want to alert them to the duplicate name and send them back to the field to change it. What I'm after is a script that see's the duplicate and alerts them, what calculations do I need in the script? I've tried "Self" and a few others but no luck.
comment Posted August 11, 2010 Posted August 11, 2010 You cannot calculate if the current record contains a value that exists in another record without a relationship. Without a relationship, you would need to perform a find.
Mickdn Posted August 14, 2010 Author Posted August 14, 2010 Sorry about the delay in getting back, but finally sorted it out. Many Thanks to all.
Recommended Posts
This topic is 5274 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now