Jump to content

dschultz

Newbies
  • Posts

    5
  • Joined

  • Last visited

dschultz's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Thanks for the tip about using the Paste Result, it does the same thing in one command that I was doing in two commands. In my script I do not set a global field with the error code after the Exit Record/Request. If I do that, then yes the script will terminate as the field validation fails and throws a user error message to the screen, instead I immediately check the error status after the Exit Record/Request. This allows me to check the success of the Paste Result and make a decision about what to do next depending on the error code. My script in practice is more elaborate than the snippet I posted here. The script actually sets an IP address and if that address violates the validation rule of the field then I increment the IP address via a Loop and Paste in a new value. Again if the address violates the rule I continue until I get to an address that is unique in the database and exit the Loop. The script works well for the task I need it to complete. Dale
  2. Hi: I've tested various commands in place of the "Exit Record/Request" and this is the only command that allowed for successful error checking and handling. The other commands I tried such as: "Goto Next Field", "Enter Browse Mode" or "Flush to Disk" all cause the srcipt to throw a typical user level error message that halts the script prior to error checking, as you suggested. Dale
  3. Using the idea of a "commit" I've determined that if I preceed my Set Field command with a "Goto Field" command and then after I Set the field I add the command "Exit Record/Request", I can successfully perform the error check. Here's my updated script: Set Error Capture [On] Goto Field ["Management IP Address"] Set Field ["Management IP Address",""10.1.4.208""] Exit Record/Request If ["Status(CurrentError) <> 0"] Show Message ["Management IP Address Validation Error"] Exit Script End If Thanks for the tip which led to this resolution. Dale
  4. I did try a "Goto Next Field" immediately after the "Set Field" to see if that enforced the validation check, but it didn't do anything either. I'll try a couple of other navigational type commands and a flush to disk to see if that triggers the validation. Thanks.
  5. Hi: My question is about the value of CurrentError after setting a field value in a script. I have a script that sets a field and the field is defined to contain unique values only. When my script sets the field with a duplicate value I do not get the expected error '504 Value in field does not meet unique value validation entry options' in the 'CurrentError' function and therefore can not handle the error condition in the script. Does anyone know why the Set Field script command would be successful in bypassing the validation rules set for the field? Here's my short script: Set Error Capture [On] Set Field ["Management IP Address",""10.1.4.208""] If ["Status(CurrentError) <> 0"] Show Message ["Management IP Address Validation Error"] Exit Script End If Thanks in advance. Dale
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.