New to Telerik Document Processing? Start a free 30-day trial

Implements the IF function, which evaluates a logical condition and returns one value when TRUE and another when FALSE.

Definition

Constructors

Initializes a new IF function instance for conditional branching based on boolean evaluation.

C#
public IfFunction()

Fields

The name of the function.

C#
public static readonly string FunctionName

Properties

Gets the rules controlling how arguments are converted before evaluation.

C#
public override ArgumentConversionRules ArgumentConversionRules { get; }
Property Value:

The argument conversion rules as ArgumentConversionRules.

Overrides: FunctionBase.ArgumentConversionRules

Gets metadata describing the function's category, description, and argument structure.

C#
public override FunctionInfo FunctionInfo { get; }
Property Value:

The function info as FunctionInfo.

Overrides: FunctionBase.FunctionInfo

When true, FunctionBase automatically evaluates this function element-wise over any multi-element array argument and returns a spilled array result. Override to true in pure scalar functions (e.g. ABS, LEN, MOD) where applying the function independently to each element of an input array is the correct dynamic-array behavior. Leave false (the default) for reducers.

C#
public override bool LiftsOverArrays { get; }

Overrides: FunctionBase.LiftsOverArrays

Gets the function name "IF" used in formulas.

C#
public override string Name { get; }
Property Value:

The name as String.

Overrides: FunctionBase.Name

Methods

Evaluates the function by testing the logical condition and returning the corresponding true-branch or false-branch value. When the condition evaluates to an ArrayExpression, the function applies element-wise IF and returns an array.

C#
protected override RadExpression EvaluateOverride(FunctionEvaluationContext<RadExpression> context)
Parameters:contextFunctionEvaluationContext<RadExpression>

The context.

Returns:

RadExpression

Function result as RadExpression.

Overrides: FunctionBase.EvaluateOverride(FunctionEvaluationContext<RadExpression>)