{{tag>Function Function_List Mathematical Version:v8.4}} ====== EXEC_SPF ====== ===== Description ===== Executes the specified stored procedure and returns a value in the ''OUT'' parameter of the stored procedure. The stored procedure must have one and only one ''OUT'' parameter defined. All other parameters (if any) should be ''IN'' parameters. The returned value is of Plain Text type. If you need to convert it to number use the ''[[ref:a_f:f:af:as_number|AS_NUMBER]]'' function on the result ===== Syntax ===== ''EXEC_SPF (procedure, database[, value, ...])'' Cannot be used in the condition of a [[:ref:a_f:a:find|FIND]] action. ===== Parameters ===== The first parameter is the name of the stored procedure to execute. The second parameter is the string identifying database environment ('MAIN' for the native one).All other parameters (if any) are ''IN'' parameters of the stored procedure ===== Returns ===== **Number**: the value of the stored procedure's only OUT parameter, which must be its last parameter; database 'MAIN' means the native AwareIM database ===== Example ===== IF EXEC_SPF ('ContactNotesCount', 'MAIN', Customer.ID) = 4 THEN ... ===== Related ===== [[ref:a_f:f:af:as_number|AS_NUMBER]], [[ref:a_f:f:af:eval_string|EVAL_STRING]]