Df19.1 and SQL Express
Hi to all,
I know this is a basic question.
I have this view which is being called from a dbgrid. The record is showing correctly however when I am trying to save any changes the error 'Duplicate Records not allowed in File' pops up.
In the DD the 'Reject_Reason' field, which is the last field of the main index, has both the Autofind_Ge and Find Required to True.
What am I missing?
This is a recnum table.
TIA
Jesmond
Code:
Open Clmrej
Open Benefic
Open Rejrea
Open MEDTREAT
Register_Object RejectReasons_sl
Register_Object MedicalTreatment_sl
Class Clmrej_DataDictionary Is A DataDictionary
// Define_Fields:
// This procedure is used to set up all data-dictionary rules.
Procedure Construct_Object
Forward Send Construct_Object
Set Main_File To Clmrej.File_Number
Set Add_Server_File to MEDTREAT.File_Number
Set Add_Server_File to REJREA.File_Number
Set Foreign_Field_Option DD_KEYFIELD DD_FINDREQ to True
Set Foreign_Field_Option DD_INDEXFIELD DD_NOPUT to True
Set Foreign_Field_Option DD_DEFAULT DD_DISPLAYONLY to True
// Parent (Server) file structure...............
// Field-based properties.......................
Set Field_Option Field Clmrej.Policy_Number DD_CAPSLOCK to True
Set Key_Field_State Field Clmrej.Policy_Number To TRUE
Set Key_Field_State Field CLMREJ.BENEFICIARY_NO to True
Set Field_Label_Long Field Clmrej.Reject_Date To "Reject Date"
Set Field_Option Field CLMREJ.REJECT_DATE DD_NOENTER to True
Set Field_Label_Long Field Clmrej.Rejected_By To "Rejected By"
Set Field_Option Field Clmrej.Rejected_By DD_CAPSLOCK to True
Set Field_Option Field CLMREJ.REJECTED_BY DD_NOENTER to True
Set Field_Label_Long Field Clmrej.Reject_Reason To "Reason Code"
Set Field_Option Field Clmrej.Reject_Reason DD_CAPSLOCK to True
Set Field_Prompt_Object Field Clmrej.Reject_Reason to RejectReasons_sl
Set Field_Exit_msg Field CLMREJ.REJECT_REASON to ExitCLMREJREJECT_REASON
Set Key_Field_State Field CLMREJ.REJECT_REASON to True
Set Field_Option Field CLMREJ.REJECT_REASON DD_AUTOFIND_GE to True
Set Field_Option Field CLMREJ.REJECT_REASON DD_FINDREQ to True
Set Field_Label_Long Field Clmrej.Amount To "Reject Amount"
Set Field_Mask_Type Field Clmrej.Amount To MASK_CURRENCY_WINDOW
Set Status_Help Field Clmrej.Amount To "Rejected amount"
Set Field_Prompt_Object Field CLMREJ.REFERENCE_NO to MedicalTreatment_sl
Set Key_Field_State Field CLMREJ.REFERENCE_NO to True
Set Field_Prompt_Object Field Clmrej.Claim_Number to MedicalTreatment_sl
Set Key_Field_State Field CLMREJ.CLAIM_NUMBER to True
Set Field_Prompt_Object Field Clmrej.Treatment_No to MedicalTreatment_sl
Set Key_Field_State Field CLMREJ.TREATMENT_NO to True
Set Field_Checkbox_Values Field CLMREJ.CUSTOM_WORDING to "Y" "N"
End_Procedure // Construct_Object
// Field_Defaults:
// This procedure is used to establish default field values.
Procedure Field_Defaults
Forward Send Field_Defaults
Set Field_Changed_Value Field CLMREJ.CUSTOM_WORDING to "N"
End_Procedure // Field_Defaults
Procedure Creating
Move gsUserID to CLMREJ.REJECTED_BY
Sysdate CLMREJ.REJECT_DATE
Forward Send Creating
End_Procedure
Procedure ExitCLMREJTEXT Integer iColumn String sValue
End_Procedure
Procedure ExitCLMREJREJECT_REASON Integer iColumn String sValue
String sPrevReason
Get Field_Current_Value Field clmrej.REJECT_REASON to sPrevReason
If (sPrevReason <> sValue) Begin
Set Field_Changed_Value CLMREJ.TEXT to REJREA.REJECT_DESCR
End
End_Procedure
End_Class // Clmrej_DataDictionary
#IFDEF Is$WebApp
#ELSE
Use RejectReasons.sl // RejectReasons_sl
Use MedicalTreatment.sl // MedicalTreatment_sl
#ENDIF