Salesforce

EvalStrInfo (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

EvalStrInfo (Magic xpa 3.x)

Checks a string representing a Magic xpa expression that can be evaluated using the EvalStr function and retrieves information about the expression.

Syntax:

EvalStrInfo(expression string,option)

Parameters:

expression string – A string representing an expression that can be evaluated using the EvalStr function. It can be a literal string, in single quotes, or an Alpha variable. The maximum allowed length of a function’s string parameter is 32,768 characters.

option – A numeric value that sets the type of information that can be retrieved.

The options are:

1 – Attribute

2 – Expression Parser Error

3 – Result Expression

Returns:

A string with the information according to the selected option.

Options:

Attribute (option=1)

If the string represents a valid expression. the function returns the resolved attribute of the expression:

A – The expression returns an Alpha value.

N – The expression returns a Numeric value.

L – The expression returns a Logical value.

B – The expression returns a BLOB-based value. This includes BLOB, Vector, OLE, and Active-X data values.

D – The expression returns a Date attribute.

T – The expression returns a Time attribute.

* – The expression returns an undetermined attribute.

Error – The expression in invalid.

Note:

Date and Time attributes are returned only if the expression is a single function that is date or time-related, such as Time(), or a simple variable letter combination of a Date or Time variable, such as 'A'. For more complex expressions with Date or Time values, the expression will be identified as a Numeric attribute.

For example: EvalStrInfo('123',1) returns N

If the string represents an invalid expression, the function returns an error string.

For example: EvalStrInfo('123+',1) returns Error

See also:

How Do I Construct and Evaluate an Expression at Runtime?

The Online and Rich Client Samples projects (program EX02 and REX02)

Reference
Attachment 
Attachment