elvis_impersonating_penguin Posted January 7, 2002 Posted January 7, 2002 ok, i have a loop that runs through some record and does a few things. but if someone else is modifying one of the records i get the error that "this record is being modified by so and so." how can i test for this error and use an if statement to make it skip the record...
BobWeaver Posted January 7, 2002 Posted January 7, 2002 Use the "Set Error Capture [on]" step at the beginning of your script and then in your loop check for Status(CurrentError)=301 which indicates a locked record. Actually, if Error Capture is on, then any locked records will automatically be skipped with no warning. So, depending on what you are doing, you may not need the CurrentError test.
elvis_impersonating_penguin Posted January 7, 2002 Author Posted January 7, 2002 thanks for your reply... that was what i needed.. i am setting it up to skip the record and e-mail me if a record was skipped. then i can go back and check to see which record was skipped and do what needs to be done to that record.
BobWeaver Posted January 7, 2002 Posted January 7, 2002 I should just add that the Error status should be checked immediately after performing a step that attempts to modify the record, or enters a field. It isn't enough just to go to the record. Something like: code: Loop Go to Field [Myfield, select] If [status(CurrentError)=301] # Take whatever action required for locked record . . . Else # Record not locked, so continue . . . End If Go to Record/Request[next, exit after last] End Loop [ January 07, 2002: Message edited by: BobWeaver ]
elvis_impersonating_penguin Posted January 7, 2002 Author Posted January 7, 2002 thats what i did.. i put it right after a step that attempts to access a field in the record...
Recommended Posts
This topic is 8360 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