How to Automatically Add a Record with Quick Base Actions

Tips & Tricks
May 4, 2017
11 Min Read
How to use QuickBase Actions Part 2


How to use QuickBase Actions Part 2


This blog post is a continuation of the ‘How To Boost Your App Design Using QuickBase Actions: Part 1’ piece published last week.

Last week I wrote Part 1 to this blog post, about our new QuickBase Actions product enhancement, and walked you through a scenario involving the set up of a QuickBase Action to edit related records. Hopefully you've had the chance to read and absorb that post in full ahead of tackling this next scenario.  We will still leverage the 'Sales & Projects Lifecycle' application that is available for download in the QuickBase Exchange if you'd like to follow along with me to create this second QuickBase Action.  In this blog, I'll show you how to automatically add a record with QuickBase Actions.

As a refresher, here is a screenshot of the app's relationship diagram. Again, for the purposes of my discussion around how to set up this QuickBase Action, we'll focus on three tables: Customers, Opportunities, and Activities.


Relationship Diagram in Sales & Project Lifecycle App

Scenario 2 - Using QuickBase Actions to Add Records

In this scenario, I'll show you how to build a QuickBase Action on the Opportunities table so that when an Opportunity record’s [Status] is updated to ‘W - Won’, QuickBase will automatically add a record on the Activities table related to that same Customer and do the following with the added record:

  • Write the value ‘Schedule’ in [Activity Type] field
  • Copy the value from [Sales Rep] field on Opportunity record to [Scheduled For] field
  • Write the value ‘Onboarding Call’ to [Scheduled Activity Subject] field
  • Write the value ‘Remember to Schedule Onboarding Call for [Opportunity] %reclink%’ to [Notes] field

This type of QuickBase Action will help automatically ensure the Sales Rep tied to a specific opportunity that is won has an activity added for them so they remember to set up an onboarding call for the related customer. Your sales reps have so many opportunities and customer engagements ongoing at any one time that this level of granular workflow management can help ensure they don't forget or miss a step! After all, we're only human, but the onboarding call is a very important and timely step in your larger, overarching process.


Setting up the QuickBase Action

The setup of this QuickBase Action will probably feel much simpler to you if you’ve taken the time to work through Scenario 1. But, it is conceptually as complex, given what you are essentially doing is having QuickBase take an action to create a record in a separate child table that is technically unrelated to the one in which the data is changing, by virtue of a simple glance at the relationship diagram.

However, setting up QuickBase Actions in the nature again accomplishes the task at hand by leveraging matching values. But for this ‘Add Record’ scenario, there is no custom Report Link field actually necessary. Follow these steps:


Step 1. From the Opportunities table form, reopen the table Settings, and click on the  ‘+New’ button above where it now says ’Quick Base actions’.

Step 2. Name and document a description as to what the QuickBase Action is being set up to do in the respective fields that display at top of the resulting page.

Step 3. Select the appropriate 'WHEN' criteria (same as Scenario 1 to make it easy for you!). In this scenario, we still want to set up our QuickBase Action so that WHEN an opportunity is ‘modified or added’ and define an additional criteria. That additional criteria will furthermore define that we only want the QuickBase action to occur only WHEN the [Status] field specifically changes and after the change the condition we want to be true is when the [Status] is equal to the value ‘W- Won’.


Setting up the QuickBase Action for Adding a Record


Step 4. Select the appropriate 'THEN' action. In this scenario, we want to setup our QuickBase Action to ‘Add a Record’ and tell QuickBase that the record added based on the ‘WHEN’ criteria is to be located within the same domain and app. This may seem obvious, which is why those dropdowns are filled out already by default, but it’s actually possible to ‘Add a Record’ to a different application entirely! Wow. We won’t go there in this blog post. Make sure to then define the table upon which the new record will exist.

Step 5. Now comes the fun part. Define any values you will want the new record created to have at the time it’s added. Similar to what is discussed in Step 5 of Scenario 1, you have options here. There are three (3) types of add actions you may leverage.

        1. Copy the value from a Field in the changed record.
        2. Copy the old value from a Field in the changed record.
        3. Write the value (that you then define) to a Field in the target table. You can choose from a list of fields & markers that display to the right to help you easily define what value you want to specifically write. 

Its important to note, you may include multiple components within the same QuickBase Action, of course assuming that the pieces being added all need to happen for the given WHEN criteria. To incorporate multiple components within the same QuickBase Action, all you need to do is hover your cursor over the existing action detail row, and click on the green ‘+’ button that displays to the right of the ‘Field in the target table…’ drop-down.

Working down the fields on the Activities table form, I elected in this scenario to add the following components in this single QuickBase Action:

  • Write the value ‘Schedule’ in [Activity Type] field
  • Copy the value from [Sales Rep] field on Opportunity record to [Scheduled For] field
  • Write the value ‘Remember to Schedule Onboarding Call for [Opportunity] %reclink%’ to [Notes] field
  • *IMPORTANT* we must also not forget to include the “link” so that the added Activity record connects to the appropriate parent Customer record. Doing this is simple though. For this to work, we want to Copy the value from [Related Customer] field on Opportunity record to the [Related Customer] field on the Activities table. They are different fields, labeled the same thing on each of the tables, and as you probably guessed, store the same exact information to properly link the records to the parent Customer record -- the Record ID# of the specific Customer record.

Setup for QuickBase Action THEN criteria


Step 6. Click the green ‘Save’ button at the top right of the page and test away, checking out the newly created QuickBase Action at work! You’ll need to toggle between the different tables to see it in action (pun intended) but if you set an existing Opportunity record to won, you should notice a new Activity record getting created on the Activities table, child to the related Customer. It will also show up in the embedded Activities report on the actual Customer record as well for quick reference.


Now that I’ve walked you through how to create both types of QuickBase Actions at length, consider some ideas for your own app and try bringing them to life! Much like the process of data and process modeling, once you actually get to implementing a QuickBase Action for an already existing app, it helps to write out and document (perhaps ad nauseum) what you want your QuickBase Action to do -- so you then have a list of what you need, and creating it will be a cinch!


Recomended Posts