project QadFinancials > class BSharedSetMerge > method GetValidationRulesForSSTypeProject
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program6/bsharedsetmerge.p)
/* =================================================================================================== */
/* Method : GetValidationRulesForSSTypeProject */
/* Desc : This method populates temporary tables with rules for validation of shared set data */
/* =================================================================================================== */
assign oiReturnStatus = -98.
/* =================================================================================================== */
/* Validation rules */
/* =================================================================================================== */
create tMergeValidateTable.
assign tMergeValidateTable.tcTableName = "Project":U
tMergeValidateTable.tlDeleteRedundantOnly = false
tMergeValidateTable.tcParentTableName = ?
tMergeValidateTable.tc_Rowid = "1":U.
create tMergeValidateField.
assign tMergeValidateField.tcFieldName = "tiProject_ID":U
tMergeValidateField.tiMergeType = {&SHAREDSETMERGE-FIELDTYPE-ID}
tMergeValidateField.tlIsBlankAllowed = false
tMergeValidateField.tc_ParentRowid = tMergeValidateTable.tc_Rowid.
create tMergeValidateField.
assign tMergeValidateField.tcFieldName = "tcProjectCode":U
tMergeValidateField.tiMergeType = {&SHAREDSETMERGE-FIELDTYPE-KEY}
tMergeValidateField.tlIsBlankAllowed = false
tMergeValidateField.tc_ParentRowid = tMergeValidateTable.tc_Rowid.
create tMergeValidateField.
assign tMergeValidateField.tcFieldName = "tcProjectSystemStatus":U
tMergeValidateField.tiMergeType = {&SHAREDSETMERGE-FIELDTYPE-MANDATORY}
tMergeValidateField.tlIsBlankAllowed = false
tMergeValidateField.tc_ParentRowid = tMergeValidateTable.tc_Rowid.
create tMergeValidateField.
assign tMergeValidateField.tcFieldName = "tcBudgetGroupCode":U
tMergeValidateField.tiMergeType = {&SHAREDSETMERGE-FIELDTYPE-MANDATORY}
tMergeValidateField.tlIsBlankAllowed = true
tMergeValidateField.tc_ParentRowid = tMergeValidateTable.tc_Rowid.
create tMergeValidateField.
assign tMergeValidateField.tcFieldName = "tiSharedSet_ID":U
tMergeValidateField.tiMergeType = {&SHAREDSETMERGE-FIELDTYPE-TECHNICAL}
tMergeValidateField.tlIsBlankAllowed = false
tMergeValidateField.tc_ParentRowid = tMergeValidateTable.tc_Rowid.
create tMergeValidateField.
assign tMergeValidateField.tcFieldName = "tcMainProjectCode":U
tMergeValidateField.tiMergeType = {&SHAREDSETMERGE-FIELDTYPE-NON-MANDATORY}
tMergeValidateField.tlIsBlankAllowed = false
tMergeValidateField.tlIsRelationToSameTable = true
tMergeValidateField.tcRelationFieldName = "MainProject_ID":U
tMergeValidateField.tc_ParentRowid = tMergeValidateTable.tc_Rowid.
create tMergeValidateField.
assign tMergeValidateField.tcFieldName = "tcTemplateProjectCode":U
tMergeValidateField.tiMergeType = {&SHAREDSETMERGE-FIELDTYPE-NON-MANDATORY}
tMergeValidateField.tlIsBlankAllowed = false
tMergeValidateField.tlIsRelationToSameTable = true
tMergeValidateField.tcRelationFieldName = "TemplateProject_ID":U
tMergeValidateField.tc_ParentRowid = tMergeValidateTable.tc_Rowid.
/* =================================================================================================== */
/* Return */
/* =================================================================================================== */
if oiReturnStatus = -98 then assign oiReturnStatus = 0.