AnsweredAssumed Answered

Capturing a 504 Error for a Unique Value Validation

Question asked by user12884 on Jan 31, 2012
Latest reply on Dec 18, 2013 by Stephen Huston

I have not been able to capture the 504 Error code. I need to handle unique records with a Duplicate field in a special way but allow them to exist.

 

Situation:

1. I have a field from another table that is read into a text field (Paragraph) via lookup on record creation.

2. Paragraph field contains a serial number and part number among other things.

3. The serial number and part number are parsed into their respective fields from the Paragraph field as calculations.

4. A calculation field (Unique SNPN) combines the two numbers and validates that the combined number is Unique in the database.

5. In a script for transfering the Paragraph info and creating the New Record:

 

Set Error Capture [On]

New Record/Request

IF [Get(LastError) <> 0]

Show Custom Dialog ["Show Message"; "An error has occurred --> #" & Get (LastError)]

End If

 

Background:

1. If I turn on the message in the Unique SNPN calculation field settings it works as planned with the dialog box. However no error code is recorded.

2. Unique SNPN field validation set for:

Unique Value, Only during data entry, Allow User to override during data entry

 

 

Question:

1. If I create the record first, then manually transfer the Paragraph into the new record and then do a commit will I be able to pick up the 504 error on a duplicate field? Or is there a more eligent method to do this?

 

Thanks

 

Richard K.

303-499-1787

Outcomes