yalon Posted November 21, 2007 Posted November 21, 2007 Hi all, I am trying to run a script that will run automatically when I close the database. I want the script to delete all records that are empty. ihave succeeded in creating such a script by searching for blank entries in "last name" field. Then I followed that up with a "delete records" command specifying all records found. This works unless there are no blank entries in "last name" field in which case I get error message and "continue script?" option. I would like to set a condition whereby if find request returns 0 results, the script is terminated and no error message is displayed. Any help would be appreciated! Thank ou, Yalon
David Jondreau Posted November 21, 2007 Posted November 21, 2007 Add this step to the beginning of your script: Set Error Capture[On] Then after the Perform Find step, add If[Get(LastError) = 0] Delete All Records End If
yalon Posted November 22, 2007 Author Posted November 22, 2007 Thank you David. That suggestions works perfectly. No more error messages. I have a new problem however that you might be able to help me with. I am creating a patient management database for the hospital department I work in. i am wondering if there is a way to trigger a message ONLY when data is being MODIFIED. Original entries into fields should not trigger this script. The message will read "are you sure you want to modify entry" to create an extra layer of protection. i have succeeded with the following script: If [Not IsEmpty (field name) Show custom dialog ["";"you are attempting to modify data"] End If Go to Field (field name) It works but the problem is that I have over 50 fields and i need to create 1 script for each field since field name changes. Is there a solution to this problem ? Thanks and sorry for the long post Yalon
Recommended Posts
This topic is 6212 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