Jump to content
  • 0

Sample Triggered Actions


astroboy

Question

5 answers to this question

Recommended Posts

  • 0

For starters, let's start with one of the most basic Triggered Actions template that you can try. Basically, this triggered action inserts records to a second table upon insert.  Here's the two table designs that I've created just to give you a better visualization of what this trigger does.

Table 1:

image.png.cc24ccfce9bd3207b025d6a312b340c7.png

Table 2:

image.png.9327097641082a624956702a7512c376.png

*These two tables contain the exact same table design but I've decided to change the name of the fields to avoid confusion.

Here's how the Triggered Actions look like:

image.thumb.png.9e6205600e4c26e985199b6ed593962f.png

The event that I've selected for this is the 'insert data' event so it will trigger whenever new records are inserted on the table. I then added an 'INSERT INTO' block and selected the destination table which is the 'User_Table_Sample2'. To be able to select the fields that I want to use as a reference for the fields in the destination table, I added a 'SELECT FROM' block and selected the table 1 which is also where this Triggered Action is placed. Lastly, you can now add all the fields that you want to include on the trigger.

Link to comment
Share on other sites

  • 0
1 minute ago, astroboy said:

I've been practicing on working with application task and I was able to make this simple template with a workflow that transfers the record to the second table if the record isn't there yet. here's the screenshot:

 

image.thumb.png.709b7bf1480ecd2fcd6d76733cb42fcb.png

In case you are wondering, you may also combine triggered actions and application tasks to achieve your desired workflow. Here's a video tutorial that I'm using as a reference: 

 

Link to comment
Share on other sites

  • 0
On 9/27/2020 at 2:14 AM, astroboy said:

For starters, let's start with one of the most basic Triggered Actions template that you can try. Basically, this triggered action inserts records to a second table upon insert.  Here's the two table designs that I've created just to give you a better visualization of what this trigger does.

Table 1:

image.png.cc24ccfce9bd3207b025d6a312b340c7.png

Table 2:

image.png.9327097641082a624956702a7512c376.png

*These two tables contain the exact same table design but I've decided to change the name of the fields to avoid confusion.

Here's how the Triggered Actions look like:

image.thumb.png.9e6205600e4c26e985199b6ed593962f.png

The event that I've selected for this is the 'insert data' event so it will trigger whenever new records are inserted on the table. I then added an 'INSERT INTO' block and selected the destination table which is the 'User_Table_Sample2'. To be able to select the fields that I want to use as a reference for the fields in the destination table, I added a 'SELECT FROM' block and selected the table 1 which is also where this Triggered Action is placed. Lastly, you can now add all the fields that you want to include on the trigger.

Hi there! Just wanted to add that if you want to reference the newly inserted or updated record, you should use the #inserted table instead of the actual table name (where you applied the trigger). This also applies if you want to reference the deleted record, you use #deleted. It is stated here in this article: https://howto.caspio.com/tables-and-views/triggered-actions/#:~:text=The-,%23inserted,-table represents data

Hope this helps anyone starting out with Triggered Actions!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...