Salesforce

RangeExpAdd (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

RangeExpAdd (Magic xpa 4.x)

Adds filtering criteria to the range, such as 'A>5 or A<2', so that the next time the view is refreshed, the new criteria will be used (in addition to the range defined in the task).

Syntax:

RangeExpAdd(generation, string)

Parameters:

generation – The generation of the task on which the range will be applied. The generation is a number that represents the task's hierarchic position in the runtime task tree. 0 represents the current task, 1 its immediate ancestor, and so on.

string – A string that evaluates to a valid Magic xpa expression. It can be a literal string in single quotation marks or an Alpha variable. The maximum allowed length of a function's string parameter is 32,768 characters.

Returns:

  • True – The range criteria were updated.

  • False – Illegal range criteria (such as non-existing variable in the expression or illegal expression content)

Note:

  • This is a server-side function.

  • The RangeExpAdd function adds criteria to the task range. When the view is refreshed, the range is done according to the task range and the criteria added in both the RangeExpAdd and RangeAdd functions.

  • To use string in the range criteria, surround it with two single apostrophes (''). This is the same as when using a string inside another string.

  • To reset the range, use the RangeReset function.

  • To convert a variable index to the variable letter, use the GetVarLetter function, which is included in the End User Functionality component's Main Program.

  • When the range is evaluated, if it follows the restrictions of Magic xpa SQL Where Range Expression then the range will be done by the database. Otherwise, it will be done on the client.

Exceptions:

This function is not supported for Local databases.

Examples:

  • RangeExpAdd(0,'A>5 or A<2') – Perform range on variable A to include only the values larger than 5 or smaller than 2.

  • RangeExpAdd(0,'A>=''a'' and A<=''c''') – Perform range on variable A to include only the values between the string 'a' and 'c'.

Since version:

3.1

Reference
Attachment 
Attachment