|Applies To||RSA Product Set: Archer|
RSA Version/Condition: All
|Issue||When Values lists are referenced in calculations, the two most common functions for these kinds of calculations are VALUEOF() and CONTAINS().|
While this article will not teach you how to write formulas for calculations, this article will go over the basic use of these functions and when it is appropriate to use these functions.
The VALUEOF function maintains the validity of a Values List field selection. If the text of a value is changed in the custom or global values list by the RSA Archer GRC administrator, this function automatically updates the formula to use the new text for the value. For example, if the value "Blue" is referenced in a formula with the VALUEOF function and that value is subsequently changed to "Red" within the values list, the value reference "Blue" will automatically be changed to "Red" within the formula.
From a user perspective, the VALUEOF function serves two additional purposes, it enables you to:
The following example shows the use of the VALUEOF function in a formula for a calculated Values List field. The VALUEOF function is used for both the "value_if_true" and "value_if_false" parameters within the IF function syntax.
IF([Risk Rating]>=10, VALUEOF([Criticality], "High"), VALUEOF([Criticality], "Low"))
The CONTAINS function is used to determine if any value within a list of values matches the value stored in a given field. If one of the values matches the field value, the function evaluates to TRUE and one value is returned. If there is no match between the list of values and the field value, the function evaluates to FALSE and another value is returned. The CONTAINS function must be used in conjunction with an IF function.
Although done infrequently, the CONTAINS function may be used to test whether the string value of a given Text field is equal to any one of a list of given string values. When a Text field is targeted, the string value in the field will be compared to the given test strings. Matching will be based on complete strings only. The function will not find a match based on a substring. For example, if the target Text field contains the value “Confiscated laptop”, CONTAINS will not find a match for a test string of “laptop”.
This second example shows the use of the VALUEOF function in a formula for a calculated Text field. The VALUEOF function is used for the value parameter within the CONTAINS function syntax.
IF(CONTAINS(ANY, [Location],VALUEOF([Location], "New York")),"Yes","No")