FRRunTextRaw

Version: 15.0.1

FRRunTextRaw (MethodText; RecursiveCall; {Param1....Param15}) → ErrorCode

Parameter Type   Description
MethodText Text FootRunner method text EXCLUDING ANY SECURITY CODE, just raw text
RecursiveCall Longint 0 = First (non-recursive) call to FRRunTextRaw
1 = Subsequent (recursive) call to FRRunTextRaw 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
  • 0 = no error
  • -108 = out of memory

Description

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 should omit the FootRunner security code.

You may pass from 0 – 15 parameters to the FootRunner being executed with the FRRunTextRaw 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 FRRunTextRaw 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.

Example

  //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)
C_TEXT ($ttText)
QUERY BY EXAMPLE ([FRs]) //Let the user select a previously saved method
If (Records in selection ([FRs])=1)
$ttText:=[FRs]Method `Execute the method
$xlError:=FRRemoveChecksum ($ttText) //Execute the method
$xlError:=FRRunTextRaw ($ttText;0) //Execute the method

If ($xlError#0) //If an error occurs, alert the user
BEEP
ALERT("Invalid FootRunner method!")
End if
End if