Class SY_Maint

Inherits

SY_Service

Properties

LOCAL cActionWrite=0  

[int] Action types used to create activity log message

LOCAL cActionDelete=1  
LOCAL cActivityLogFilePrefix$="LOG_SECURITY"  

[string] Activity Log - Prefix for secondary log file name

PROPERTY DocDateWarnDisplayed   * Read Only *

[boolean] Property used to track whether Document Date Warning message was displayed

ValueDescription
True, document Date Warning message was displayed
False, no message was displayed
PROPERTY DocDateWarnStatus   * Read Only *

[boolean] Property to indicate whether document date warnings were encountered

ValueDescription
True, warnings were encountered, use DocDateWarnObject'LastErrorNum/Msg
False, no warnings were encountered
PROPERTY EditState SET ERR ! Edit State of record (0, 1, 2)   * Read Only *
PROPERTY RecordChanged   * Read Only *
PROPERTY FirstFailure$   * Read Only *
PROPERTY DocumentTotal SET ERR ! Document Total property,   * Read Only *
PROPERTY ReadOnlyReason$   * Read Only *
PROPERTY UDTValidation$  
PROPERTY ViewOnly  
PROPERTY CurrentPrecision=PRC  
PROPERTY DocDateWarnForceOff   * Read Only *

[boolean] Property used to temporarily disable display of Document Date Warning message

PROPERTY DocDateWarnObject   * Read Only *

[object] Reference to Document Date Warning object

PROPERTY ScriptObject   * Read Only *
PROPERTY ImportTest  

Boolean - if true, records are being imported in test mode

PROPERTY SkipNullCheck$  

Allow null value in specific required fields.

PROPERTY AFSRequiredFields$   * Read Only *

Fields set to 'Required' in C/M Advanced Field Settings

Methods

FUNCTION ChangedRecordCompare(inChn, origRec$, newRec$, columns$, origVals$, newVals$)  
FUNCTION ChangedRecordCompare(inChn, origRec$, newRec$, columns$, origVals$, newVals$, logMsg$)  

Compare old / new records data to identify modified columns

ParameterDescription
inChn [fileHandle, in] Filehandle of the table that contains the records to compare. Used to derive IOLIST
origRec$ [string, in] Original state of the record to compare
newRec$ [string, in] New record to compare
columns$ [string, out] List of modified columns
origVals$ [string, out] Original value for each modified column
newVals$ [string, out] New value for each modified column
logMsg$ [string, out] {optional} Message summarizing the changes, only include if needed
Returns [int]
ValueDescription
retSUCCESS(1) If sucessfully compared
retWARNING(-1) If the records are identical
FUNCTION ChangedRecordInfo(columns$, origVals$, newVals$)  
FUNCTION ChangedRecordInfo(columns$, origVals$, newVals$, logMsg$)  
FUNCTION ChangedRecordInfo(columns$, origVals$, newVals$, logMsg$, nActionType)  

Compare old / new records data to identify modified columns

ParameterDescription
columns$ [string, out] List of modified columns
origVals$ [string, out] Original value for each modified column
newVals$ [string, out] New value for each modified column
logMsg$ [string, out] Message summarizing the changes
nActionType [int, in] 0=Update/Create, 1=Delete
Returns retSUCCESS
FUNCTION Clear()  
FUNCTION ClearRecord()  

To Clear a current working record when using Setmode type entry. This will only clear The values from the current working record and set EditState equal to None.

Returns TRUE if in setmode and Clear() from SY_Service succeeds
Returns FALSE if not in setmode or the Clear() from SY_Service fails
FUNCTION ConfirmDelete()  
FUNCTION CopyFrom()  
FUNCTION CopyFrom(key$)  
FUNCTION Delete()  
FUNCTION Delete(key$)  
FUNCTION ExportToCSV(table$)  
FUNCTION GetColumnInfo(col$, length, uppercase, class$)  
FUNCTION GetColumnInfo(col$, length, uppercase, class$, mask$)  
FUNCTION GetColumnProperties$()  
FUNCTION GetDefaults(rec$, iol$, opt$)  
FUNCTION GetOrigRecord$()  
FUNCTION GetPropertyValue(col$, property$, val$)  
FUNCTION GetPropertyValue(col$, property$, val)  
FUNCTION GetValidationGroups$()  
FUNCTION ResetDocDateWarnState()  

Reset the Document Date Warning status

Returns retSUCCESS(1)
FUNCTION SetCopyKeyValue(col$, val$)  
FUNCTION SetDocDateWarnDisplayed(bMsgDisplayed)  

Set Document Date Warning display control property

ParameterDescription
bMsgDisplayed [in, boolean] TRUE = Document Date Warning message was displayed
Returns retSUCCESS(1)
FUNCTION SetDocDateWarnOff(bDisable)  

Set state of property used for to temporarily disable display of message for Document Date Warning @property bDisable [input, boolean] TRUE = Disable message display, FALSE = Display message, if feature enabled

Returns retSUCCESS(1)
FUNCTION SetKey()  
FUNCTION SetKey(key$)  
FUNCTION SetKeyValue(col$, val$)  
FUNCTION SetPartialRecord(rec$, iol$)  
FUNCTION SetPartialRecord(rec$, iol$, updateUI)  
FUNCTION SetRecord(rec$)  
FUNCTION SetToReadOnly(reason$)  
FUNCTION SetValue(col$, val$)  
FUNCTION SetValue(col$, val$, setValueIndex$)  
FUNCTION SetValue(col$, val)  
FUNCTION SetValues(columns$, data$)  

Alternate to SetPartialRecord(), instead of a Providex compiled IOList will accept a comma-separated list of columns. The data will be separated and individual SetValues() will be done on each field. When validation takes place LastErrorMsg$ will be a concatenated list of error messages.

ParameterDescription
columns$ [input, string] comma separated list of field names that corresponds with the data sent in.
data$ [input, string] SEP (hex 8A) separated list of data that is to be set into the current record in memory
Returns [boolean]
ValueDescription
Success if data and fields matched and were successfully set into the record.
Failure if bad field list or an error returned when setting data into business logic, a SEP separated list of error messages will be returned in LastErrorMsg$
FUNCTION Write()  
FUNCTION LOCAL ActivityLogCreateFile(logFilename$)  

Activity Log - Create log file using value in cActivityLogSummaryInfo$

ParameterDescription
logFilename$ [string, out] name of log file created
Returns [boolean]
ValueDescription
Success if log file was created
Failure if log file was not created
FUNCTION LOCAL ActivityLogPrepare(nActionType)  

Activity Log - prepare secondary information before write to activity log

ParameterDescription
nActionType [int, in] 0=Update/Create, 1=Delete
Returns retSUCCESS
Info

Prepare summary of changes to data record to be attached to activity log entry. A child class can implement this method to include additional information but must call the method from SY_Maint first to initialize the summary information with field changes. IF NUL(cActivityLogSummaryInfo$) { _OBJ'ActivityLogPrepare(FROM "SY_Maint", bIsDelete) }

FUNCTION LOCAL ActivityLogSetMessage$(nActionType)  

Activity log - Set log message

ParameterDescription
nActionType [int, in] 0=Update/Create, 1=Delete
Returns logMessage$
FUNCTION LOCAL ActivityLogWrite(nActionType)  
FUNCTION LOCAL ActivityLogWrite(nActionType, skipPrepare)  

Activity log - write message and secondary information

ParameterDescription
nActionType [int, in] 0=Update/Create, 1=Delete
skipPrepare [bool, in] Flag to indicate whether to perform the ActivityLogPrepare. Used in data entry, as the prepare will have been done previously, before the write.
Returns retSUCCESS
Info

Only called when cActivityLogWrite is not zero

FUNCTION LOCAL CallScript(scriptKey$, scriptRawProc$, inCol$, inVal$, retVal, retMsg$)  
FUNCTION LOCAL CheckForAdvancedFieldSettings()  
FUNCTION LOCAL CheckForScripts(tblName$)  
FUNCTION LOCAL CheckNullRequiredField(fieldname$)  

Skip checking required field for null in update. It is used in ValidateAll().

ParameterDescription
fieldName$ [input, string] name of field with null value
Returns [boolean] True = field is required, False = field is not required
FUNCTION LOCAL PERFORM ChildValidate()  
FUNCTION LOCAL ClassValidateDate(col$, val$)  
FUNCTION LOCAL ClassValidateTelephoneNo(col$, val$)  
FUNCTION LOCAL ClearSetFiles()  
FUNCTION LOCAL ColInfoInitAll()  
FUNCTION LOCAL ColInfoInitDefaults()  
FUNCTION LOCAL CommitRow()  
FUNCTION LOCAL GetPropertyCommon(col$, property$, val$, val, isString)  
FUNCTION LOCAL InitColInfo()  
FUNCTION LOCAL InitScriptEngine()  
FUNCTION LOCAL InitWorkTable()  
FUNCTION LOCAL IsColInIOList(col$)  
FUNCTION LOCAL IsValid()  
FUNCTION LOCAL IsValid(key$)  
FUNCTION LOCAL IsValid(key$, fromCols$, toCols$)  
FUNCTION LOCAL LoadColInfo(col$, colInfoRcd$)  
FUNCTION LOCAL OpenMainTable()  
FUNCTION LOCAL ParseExtField(extension$, field$, value$)  
FUNCTION LOCAL RemoveColToSkip(col$)  
FUNCTION LOCAL ResetRow()  
FUNCTION LOCAL ResetRow(key$)  
FUNCTION LOCAL RetrieveColInfo(col$, colInfoRcd$)  
FUNCTION LOCAL SetDefaults()  
FUNCTION LOCAL SetFilter(whereClause$)  
FUNCTION LOCAL SetFilter(whereClause$, restrictKey$)  
FUNCTION LOCAL SetMode(mode$)  
FUNCTION LOCAL SetMode(mode$, whereClause$, restrictKey$)  
FUNCTION LOCAL SetParentHandle(parentTable$, parentHandle, src$, srcMap$, dstMap$)  
FUNCTION LOCAL SetValueNoValidate(col$, val$)  
FUNCTION LOCAL SetValueNoValidate(col$, val)  
FUNCTION LOCAL StoreColToSkip(col$)  
FUNCTION LOCAL Validate(col$, val$)  
FUNCTION LOCAL Validate(col$, val)  
FUNCTION LOCAL ValidateAll()  
FUNCTION LOCAL ValidateAllRecord()  
FUNCTION LOCAL ValidateColInfo(val$, colInfoRcd$)  
FUNCTION LOCAL ValidateRule(val$, desc$, dataType$, validation$, length, extension$)