Using the FWExpression class

Last published at: June 21st, 2023

The FWExpression class provides methods for replacing expression values with variable values. The expression class also lets you evaluate expressions using the expression evaluation engine. 

Replace an expression with Variable values

String sExpression = FWExpression.ReplaceVariables(“enter your expression”, “list of variable collection”, ref string sError);

All variables used within the expression will be replaced with the variables values and the expression returned back with the replacements. 

 

Evaluation and expression

Object sVal = FWExpression.Eval(“enter your expression”, FWVariableCollection oVars, FWBusinessObjectCollection oBusinessObjects, ref string sError); Insert your text here

Evaluates the expression using the variables and business objects and returns the result.