{{tag>Function Function_List Miscellaneous Version:v8.1}}
====== EVAL_STRING ======
===== Description =====
Evaluates the specified string as if it was a condition of the Rule Language. Returns the result of evaluation, which can either be a numeric value or “Yes/No” value
===== Syntax =====
''EVAL_STRING (expression[, ifyes, ifno])''
Cannot be used in the condition of a [[:ref:a_f:a:find|FIND]] action.
===== Parameters =====
An expression providing a string. Two optional extra parameters specify what should happen when condition evaluates to Yes or No (see the last example)
===== Returns =====
**Yes/No**: the result of evaluating the string as a rule condition (can also be a Number; with the two extra parameters, the matching one is returned).
===== Example =====
Object.Attribute = 'Customer.Nmb'
IF EVAL_STRING (Object.Attribute) = 5 THEN ...
Object.Attribute = 'Customer.Nmb >5'
IF EVAL_STRING (Object.Attribute) = 'Yes' THEN ...
Company.Address = Company.Address1 + EVAL_STRING('Company.Address2 IS DEFINED', CR() + Company.Address2, '')
===== Related =====
[[ref:a_f:f:af:exact|EXACT]], [[ref:a_f:f:af:get_attr_value|GET_ATTR_VALUE]], [[ref:a_f:f:af:cr|CR]]