Tasks are automated actions that can be applied to your app records on a scheduled basis (daily/weekly/monthly). These actions can drive your app’s workflow in powerful ways, such as sending automatic reminders when a deadline is coming up or automatically adding your to-do records periodically.
Knack Tip Tasks are available on Pro plans and above. View our pricing table for more information. Tasks are not available to trial users.
Add a Task
Tasks are located in the Data Builder. From any Object, use the Object Menu located at the top and click on the Tasks tab.
Add a new Task by clicking the + Add Task button.
The following details will be required:
Task Name: Give your task a specific Name to help you remember what it does!
Schedule: The frequency of your scheduled task. Scheduled Tasks can run on a daily / weekly / monthly basis.
Next Run Date: When the task is scheduled to run. This field updates every time your task runs to reflect the next scheduled time.
Status: Whether the task is On or Off. This is useful for when you want to save a task for later use.
Declare the Action
Every time your task runs, it’s going to perform a specific action. Your task can perform the following actions:
Update each record - Update each record matching your criteria
Update connected records
Insert connected records
Send a custom email
Update each record
The task is going to update each record in this Object.
This task looks at every record in the Products Object. When the task finds a record whose Quantity Remaining is 10, it will update that record’s Available value to "No"
Updated connected records
Use this action when you want to update records in another connected Object.
This task looks at every record in the Companies Object. When the task finds a record where the Active? value is "No", it is going to update every connected User and set their user status to ‘inactive’
Insert connected records
This action inserts a record in another connected Object.
Using the Products Object again, this task will automatically insert a connected Purchase Order record for a Product when their inventory level reaches the threshold. The task uses a field value each Product is ordered in different quantities.
Knack Tip: Notice how in the above example, we didn’t set a value for the Product connection. Knack is going to populate this value automatically since it is inserting a connected record.
Send a custom email
For every record in this Object, Knack will send a custom email. You can use record values for custom recipients, subjects, and messages. Click here to learn more about sending emails in Knack.
Using values from the Purchase Order record, this task will notify employees which Purchase Orders still need to be approved
Filter the Records
All of these actions affect all records by default. Add criteria to the task if you want to target a specific set of records.
Rules added here are treated as AND rules, meaning all rules must be met.
In this example target records when Status is "Pending", AND Date “is during the previous 2 weeks”
Set the Record values
Now that you’ve selected an action and added criteria, it’s time to tell the task what values it is going to update / insert. Value options available include:
to a custom value: update a value to custom value you desire
to a field value: update the Field using the value from another Field
to a connected value: update a Field value to using a value located in a connected record from a one-to-one / one-to-many relationship
This example will update the status of an Order Item using its parent Order’s status
Knack Tip: Not seeing the option labeled to a connected value? Double-check your connections -- you will not be able to access connected record using many-to-many / many-to-one connections.
The History tab helps you keep track of what your task has done over time. It shows you a timestamped list of all the times this task has run, and how many records were processed. If the task was run manually, it will say so next to the timestamp.
Run a Task Manually
You may find it useful to run a specific task without wanting to take it off its regular schedule. In this case you can use the Run tab in a task to run it manually. You'll see a confirmation message that your task is currently running. You can use the History to confirm whether the task has completed or not.
Pause a Task
If you want to stop using your task for the time being, you don't have to delete it entirely. To pause an existing task indeterminately, change its Status setting to "Off". You can quickly see if a task is paused directly from the task list.
Delete a Task
To delete an existing task, locate the task under the Tasks tab and click the delete icon. You will need to Confirm the task deletion before it is deleted