◷ Reading Time: 2 minutes
Summary
Database commands such as Insert, Delete and Update can be performed using this rule command.
Parameters
- command
- Description: The TSQL command
- Mandatory: Yes
- Type: String
- return
- Description: Name of the variable in which the row will be stored
- Mandatory: Yes
- Type: String
- storedProcedure
- Description: Determines whether the command should execute a stored procedure in the database
- Mandatory: False
- Type: Boolean (true/false)
Internal Commands
Param
Sample
<While condition="index lt 2"> <Var name="index" value="index+1"/> <ExecuteNonQuery command="INSERT INTO person ([fname],[lname]) VALUES (@name, @family)" return="count"> <Param name="name" value='"name"+(index.ToString())'/> <Param name="family" value='"family"+(index.ToString())'/> </ExecuteNonQuery> </While>
Adding Bulk values
When you want to update the table with a list of values, you can use the bulk option.
For example, in the below command, values are defined as a variable in the project.
value list =
[
{
"Id" : 1,
"AssetStatus" : "queued"
},
{
"Id" : 2,
"AssetStatus" : "queued"
},
{
"Id" : 3,
"AssetStatus" : "queued"
}
]Under Bulk, we can reference this value list.
