Function Return Values

The result of a logic function must be assigned to the keyword RESULT.

RESULT = CURVAL + (|810| * .5)

If no return value is assigned to the RESULT keyword, the logic engine sets the value of RESULT to zero. Thus, the calculation is skipped, and the logic account is not created.

The following function uses the CURVAL parameter to assign the result of the logic account calculation to RESULT, if the logic account calculation returns a value greater than zero.

If CURVAL > 0 Then 
	RESULT = CURVAL 
Else
	Result=”Skip”
End If

The greater-than-zero example illustrates conditional mapping. That is, if the source account specified in the Criteria Value column is less than zero, the logic account is not created (because the keyword “Skip” is used).

The following function uses the CURVAL parameter to assign the result of the logic account calculation to RESULT, if the logic account calculation returns a value less than zero.

If CURVAL < 0 Then 
	RESULT = CURVAL 
Else
	Result=”Skip”
End If 

The following function assigns the result of the logic account calculation to RESULT only if 10 is the active FDM category key.

If strCatKey = “10” then 
	RESULT = CURVAL 
Else
	Result=”Skip”
End If

The following function assigns the result of the logic account calculation to RESULT only if the criteria account center is 000.

If strCenter = “000” then 
	RESULT = CURVAL * 100 
Else
	Result=”Skip”
End If 

The following function uses the FDM Lookup function to add a source account (810) to the value of the logic account, if the current FDM period is December, 2003.

If strPerKey = “12/31/2003” then 
	RESULT = CURVAL + |810| 
Else
	Result=”Skip”
End If 

The following function uses the FDM Lookup function to add a source account (810) and a source account from a specified source center, FDM category, and FDM period to the value of the logic account, if the active location is Texas.

If strLocation = “Texas” then =
	RESULT = CURVAL + |000,10,09/30/01,810| 
Else
	Result=”Skip”
End If