Set Parameters for Stored Procedures

When creating a custom form button, you may want to initiate a stored procedure.

In the following example, we will place a button on the PR Employees form that, when clicked, will pass the current employee’s sort name to an associated stored procedure.
  1. On the Info tab in VA Custom Form Buttons, create the custom form button. Make sure to specify PR Employees as the form you are placing the form on, and the stored procedure in the Action field. For more information, see Creating Custom Form Buttons.
  2. Select the Parameters tab.
  3. Enter a parameter number in the ParameterID field or enter ‘New’, ‘N’, or ‘+’’ to have the system generate the next available number.
  4. Enter a name for the parameter in the Name field.
    Note: This field is optional; however, it is a good idea to enter a name that helps describe the parameter. For this example, you might enter Sort Name.
  5. Select 3-Form Input value from the DefaultType drop-down.
  6. In the DefaultValue field, press F4, select the field name that contains the value to pass to the stored procedure, and click OK. In this example, select SortName from the F4 lookup. The system defaults the field’s sequence number in the DefaultValue field. In this example, the sequence is 20.
  7. Save the record.
  8. Open the form with the button and move the button to a new location, as necessary. In this case, open PR Employees.
  9. Click the custom form button to initiate the stored procedure.