Parameter | Type | Description | |
---|---|---|---|
MethodText | Text | → | FootRunner method text including a valid security code, see FRAppendChecksum |
RecursiveCall | Longint | → | 0 = First (non-recursive) call to FRRunText 1 = Subsequent (recursive) call to FRRunText from within a FootRunner script, whether directly or indirectly. |
Parameters 1 through 15 |
Text | → | Optional text variable containing parameter passed to the FootRunner method. Maximum of 15 parameters may be passed |
ErrorCode | Longint | ← |
Returns a code which is used to determine if an error occurred
|
Your FootRunner code may contain any number of local variables of any type except local arrays. You must declare all of your local variables using standard 4D compiler declarations at the top of your FootRunner method. Attempts to execute FootRunner methods containing undeclared local variables will result in a runtime error.
The method text requires the FootRunner security code.
You may pass 0 to 15 parameters to the FootRunner being executed with the FRRunText command. All parameters are passed as text values. WARNING: You MUST declare your parameters in your FootRunner method code. Add C_TEXT($1;$2;...) to your FootRunner method, otherwise your parameters will not work.
You may want to embed the FRRunText command in a 4D transaction. Cancel the transaction if an error occurs during execution of your FootRunner method. Validate the transaction if execution is successful. Note that analyses and updates performed on large data files may produce transactions that exceed available workstation memory.
You may now call FRRunText or FRRunTextRaw from another FootRunner. When doing this, pass a value of 1 to the RecursiveCall parameter.
//Allow the user to open and execute a FootRunner method
//Notify them if the method is not a valid FootRunner method
//[FRs]Method includes FootRunner Security code
C_LONGINT ($xlError)
QUERY BY EXAMPLE ([FRs]) //Let the user select a previously saved method
If (Records in selection ([FRs])=1)
$xlError:=FRRunText ([FRs]Method;0) //Execute the method
If ($xlError#0) //If an error occurs, alert the user
BEEP
ALERT("Invalid FootRunner method!")
End if
End if