Stored procedures let you set up your own custom logic into the submission process. Procedures are created in SQL server then set up in FormFlow - Forms.
For this feature to work:
You must have a connection to the database you are mapping to set up in FormFlow. See Set Up Database Connections for more information.
You must have execute permission on the procedure.
Set Up Stored Procedures
1. Log in to the campus portal as an administrator and access EX FormFlow - Forms.
2. Click Manage Forms. The Manage Forms page appears.
3. Click on the name of the form you want to update. The Form page appears.
4. From the Tools menu, select Stored Procedures. The Procedures page appears.
5. Click New Procedure.
6. From the Database drop-down, select the database from which the stored procedure is derived.
7. For multiple response questions, such as the Collection Grid, you can click New Multi-Response Procedure. This will tell the form to execute the procedure once FOR EACH response to the question.
8. From the This statement should be executed on drop-down, select
· Submit occurs when the Event action Form: Submit is executed. All Save statements are executed automatically prior to the Submit statements being executed.
· Save occurs when the Event action Form: Save is executed.
· Workflow occurs upon receiving a command from the Workflow portlet. This command is sent when a document progresses from a stage that has the “Execute Statements” setting checked
9. From the Procedure drop-down, select the procedure to be executed. The table drop-down options appear. Example
Sample stored procedure
CREATE PROCEDURE dbo.AAA_spNameUpdateSubmission
SET NOCOUNT ON;
INSERT INTO AAA_NAME_UPDATES (ID_NUM, FIRST_NAME, LAST_NAME) VALUES (@ID_NUM, @FIRST_NAME, @LAST_NAME)
Procedures are created in SQL Server.
10. Select the stored procedures you want to execute.
11. From the parameter table drop-downs, select the form question you are mapping to the parameter or the following:
· Custom Value is defined text that is always be inserted into the column
· Submission as PNG converts the final form submission into a PNG file and stores it as a byte array in the database
· Submission as PDF converts the final form submission into a PDF file and stores it as a byte array in the database
· Collection Grid: * values indicate the column in the collection grid that should be referenced when inserting into the field. These questions are “Source” questions. Collection Grid: Row Number is generated at submission time and represents the row order where the data exists in the user input.
12. Click Save.
13. Repeat steps 5 - 10 to create as many stored procedures as needed.
14. Click Done.