Stored procedures are used to process form submissions and insert or update data in the ERP database tables. 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. Procedures are executed at the time of submission unless specified to be executed on approval. If executed on approval, the Workflow portlet will control the time of execution.
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. |
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
@ID_NUM int,
@FIRST_NAME varchar(30),
@LAST_NAME varchar(30)
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO AAA_NAME_UPDATES (ID_NUM, FIRST_NAME, LAST_NAME) VALUES (@ID_NUM, @FIRST_NAME, @LAST_NAME)
END
Procedures are created in SQL Server. |
10. From the parameter table drop-downs, select the form question you are mapping to the parameter or the following:
· NULL will enter in a null value.
· 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. (This functionality is not supported for CX.)
· Submission as PDF converts the final form submission into a PDF file and stores it as a byte array in the database. (This functionality is not supported for CX.)
· 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.
11. Click Save.
12. Repeat steps 5 - 10 to create as many stored procedures as needed.
13. Click Done.
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. Example
5. Click New Procedure. Criteria to create a new procedure appear.
6. From the Database drop-down, select the database from which the stored procedure is derived.
7. From the This statement should be executed on drop-down, select one of the following options. Example
· 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
8. From the Procedure drop-down, select the procedure to be executed. If there are parameters in the stored procedure, corresponding drop-down options appear.
Procedures need to be created in SQL Server and execute access given to the user for the procedure to be available in the drop-down. |
9. From the drop-down of the parameter you wish to map the PDF to, select Submission as PDF. This option will convert the final form submission into a PDF file and store it as a byte array in the database.
10. Click Save.
11. Click Done.
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. Example
5. Click New Procedure. Criteria to create a new procedure appear.
6. From the Database drop-down, select the database from which the stored procedure is derived.
7. From the This statement should be executed on drop-down, select one of the following options. Example
· 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
8. From the Procedure drop-down, select the procedure to be executed. If there are parameters in the stored procedure, corresponding drop-down options appear.
Procedures need to be created in SQL Server and execute access given to the user for the procedure to be available in the drop-down. |
9. From the drop-down of the parameter you wish to map the PNG to, select Submission as PNG. This option will convert the final form submission into a PNG file and store it as a byte array in the database.
10. Click Save.
11. Click Done.
Workflow Stored Procedures