What would you like to know more about?

Run Procedure

Process Steps can run a SQL statement. Enter a complete and valid T-SQL statement in the SQL Statement field. Note that the statement is limited to 1,000 characters.

You can use the following tokens as parameters in your query:
  • dp_RecordID – The ID of the record invoked by workflow.
  • dp_UserID – The User record ID of the user set in the step's Task Owner.
  • dp_DomainTime – Represents the current time according to the Time Zone set in the Domain record.

For example, let's say you want to create a Milestone record when someone fills out a custom form. You can use a Process with a Run Procedure step to do this! On the Process Step record, the SQL Statement would look like this:

INSERT INTO Participant_Milestones (Participant_ID ,Milestone_ID ,Date_Accomplished ,Program_ID ,Domain_ID ,Notes) SELECT P.Participant_ID ,83 ,GETDATE() ,2 ,1 ,'Completed XYZ Form' FROM Participants P WHERE P.Contact_ID = (SELECT FR.Contact_ID FROM Form_Responses FR WHERE FR.Form_Response_ID = dp_RecordID)
Note: This example is just for demonstration purposes. To use this statement, you'd need to edit the values in the SELECT clause to substitute the relevant Milestone_ID, Program_ID, and text for the Notes field. For help writing valid SQL statements in this field, you can work with Professional Services.
thumb_upYes thumb_downNo