Salesforce

CallProg (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

CallProg (Magic xpa 3.x)

Enables a call to a program and pass arguments to it.

Syntax:

CallProg(program number, argument-1...argument-n)

Parameters:

program number, argument-1...argument-n

Returns:

The value returned by the called program.

Examples:

Your discount is' &

Str (CallProg ('23'prog,', A, FG, 'Prefered', 23),'2P0')

where program 23 returns a numeric value

Note:

NULL values cannot be passed as parameters of the CallProg function. In addition, the CallProg function cannot return a NULL value.

You can combine the CallProg function and the Return Value task property to write and refer to the program as if it is a function and accept the Return Value as a result.

For a Rich Client called program, the CallProg function does not return the task return value. This is because the expression does not wait for the program to end.

Parallel Rich Client programs called via this function will be opened as non-parallel programs.

See also:

The Online and Rich Client Samples projects (program EL11 and REL11)

The following table compares the CallProg function and the Call operation.

CallProg Function

Call Operation

Can only call a program

Can call a program or task

Can send any number of arguments but receive only one

Can send and receive any number of arguments

The parameters are always sent "by value"

The parameters can be sent "by value" or "by reference"

The returned value is set in the calling program's Return Value property

The returned value may be set in the calling program's Return Value property and will be returned to the Call Program's Ret parameter

Can be used anywhere in the task whenever an expression is used

Can be used only in the Logic Editor

Can be executed in a procedural or non-procedural way

Can be executed only as a procedural operation

Reference
Attachment 
Attachment