How to pass a parameters to a Stored Procedure via Custom Query in Work Flow?
Question
Question
How to pass a parameter to a Stored Procedure via Custom Query in Work Flow?
Answer
Maxwell,
Parameters are passed by referencing the stored procedure parameter name in the EXEC statement in the custom query. In the example below I have a stored procedure named 'GetApplicationNumber' that has a single varchar(50) parameter named '@guid' and I am passing the value from a forms token to the stored procedure;
Note: The naming syntax for the Parameter Names in the custom query depend on how you configured the connection to the database. In the example above I am using a direct SQL connection so my parameter is named, versus an ODBC connection where the parameter name would just be a '?'.
See the help files here https://www.laserfiche.com/support/webhelp/Laserfiche/10/en-US/administration/#../Subsystems/LFWorkflow/Content/Resources%2FActivities%2FCustom%20Query.htm for additional information on custom query parameter naming syntax.