In Rule Logic columns, you can use validation rule functions, in addition to validation rule expressions. FDM validation rules can use VB Script procedures. Therefore, within rules, you can set, for evaluation by a script or custom report, two custom string message fields and two numeric switch fields. Also, within rules, you can perform validations against data sources other than the target system (for example, a FDM logic account value).
You must begin rules that use functions with the keyword Fun. The keyword triggers the API to interpret the rule as a function, rather than as an expression.
You must use the keyword Result to set the return values of functions. In validation reports, rules are flagged OK (if Result returns True) or Error (if Result returns False).
The parameters of validation rule functions can be evaluated to determine whether, in regard to the current POV, validation rules pass or fail:
API—Allows the use of all FDM data values and internal API functions
strEntity—Target Entity
strTargCat—Target Category
strTargPer—Target Period
strTargYear— Target Year
strTargFreq—Target Frequency
As shown in the following script, you can set properties for RES objects which, in turn, set values for the 14 custom fields of the tDataCheck table. Custom-field values can be used within reports as warning messages and flags.
Fun: If strEntity = “TEXAS.GL” Then ‘Rule not required Result = True ‘Set Messages and Switches RES.PstrCheckMessage1 = “Rule does not apply to “ & strEntity RES.PstrCheckMessage2 = “Do not fret!” RES.PblnCheckWarning = True RES.PblnCheckClearData = True Else ‘Check Cash IF |1000| <= 0 Then Result = True ‘Set Messages and Switches RES.PstrCheckMessage1 = strEntity & “ is Good!” RES.PstrCheckMessage2 = “2” Else Result = False ‘Set Messages and Switches RES.PstrCheckMessage1 = strEntity & “ is Bad!”