Appearance
Flo_ExecuteActionSyncWithParams
Declaration
C# public static extern bool Flo_ExecuteActionSyncWithParams(string ActionFID, string InputParams);
Delphi function Flo_ExecuteActionSyncWithParams(ActionFID : PChar; InputParams : PChar) : boolean; stdcall;
Example
csharp
try
{
Boolean result =FlowAPI.Flo_ExecuteActionSyncWithParams("00000000-0000-0000-0000-000000000000","Accno|34|Group|ABC");
if (result) MessageBox.Show("Action executed successfully"); else MessageBox.Show("Action execution failed");
}
catch (Exception ex)
{
MessageBox.Show("Exception while trying to execute Action - " + ex.Message);
}pascal
Delphi
try
Result := Flo_ExecuteActionSyncWithParams('00000000-0000-0000-0000-000000000000','Accno|34|Group|ABC');
if Result then
showmessage('Action executed successfully')
else
showmessage('Action execution failed');
except
on e : exception do
showmessage('Exception while trying to execute Action - ' + e.Message);
end;Description
Executes the Action with the specified ActionFID passing it the parameters specified in InputParams. The ActionFID can be found by looking at the FID column in the FLO_ACTIONS table of the configuration database. The function returns a True or False response indicating whether the action was successfully processed or not.
Because the action will execute Synchronously it will not return until the Action has completed processing.
The InputParams parameter is a vertical pipe (|) separated list of named parameters passed as a string. The InputParams takes the format <paramname1>|<paramvalue1>|<paramname2>|<paramvalue2>|<paramname3>|<paramvalue3> etc. You can pass any number of parameters in the InputParams. The above examples pass two parameter, one named "Accno" with the value 34, the other called Group with the value 'ABC'.
TIP
The named parameters are turned into Local Globals within the action. This allows you to reference them within the Action configuration. Refer to the Variables section of the Administration Guide scripting reference for more information on Local Globals.