Process Steps can run an SQL Statement. A complete and valid T-SQL Statement should be in the SQL Statement field. The limit on the length of the statement is 1000 characters.
The following tokens can be used as parameters in your query:
dp_DomainTime: Represents the current time according to the Time Zone set in the Domain record.
For example, a Process exists to get approval for employee time off. The church allows each employee a number of days. This is stored in a custom field on their user record. Once time off is approved, we want the next step in the process to decrease the value of that user's remaining time off. This step runs a procedure and the SQL Statement might be:
UPDATE dp_Users SET Remaining_Time_Off = Time_Off_Hours_Remaining - ISNULL((SELECT Hours_Missed FROM Time_Off WHERE Time_Off_ID = dp_RecordID),0) WHERE User_ID = dp_UserID