Help

Re: Preventing multiple/duplicate linked records being created by checkbox trigger

Solved
Jump to Solution
2064 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Jacob_Taylor1
4 - Data Explorer
4 - Data Explorer

In our base, users can trigger an automation via a checkbox. When the box is checked, the automation creates a linked record in a different table and populates the fields with various text, form links, etc.

The problem is if a user does the following we get duplicate linked records:

  1. checks the box…waits until the automation finishes
  2. unchecks the box
  3. rechecks the box, now for a second time

How can we either prevent a duplicate linked record from being generated, can the automation check if a linked record exists before proceeding? Or is there a better trigger we can use that is one-directional, meaning it can only create the linked records once? I was able to do this with a button + scripting app, however they are not usable in Interfaces which is where we’re applying this functionality.

1 Solution

Accepted Solutions

I recommend using a single select field instead of a checkbox, with two values: “Create Linked Record”, and “Done creating linked record”. Initially this field will be blank. Then the user will change the value to “Create Linked Record.” This triggers the automation script. The automation script checks if there is a linked record, and only create the linked record if there isn’t one. The script also changes the single select to “Done creating linked record.” This way users are less likely to reset the single select, the way they would uncheck a checkbox. If the user does change the single select again, the script will simply change the single select back.

See Solution in Thread

3 Replies 3

Have the checkbox automation run a script instead of using the “Create Record” action. Note that you will need a Pro subscription to run a scripting action. The logic in your existing script to check for an existing linked record should be fairly easy to convert to an automation script, although it will need some changes.

Another option is to wait until you get access to conditional logic for automations (currently in beta).

This makes sense, and would prevent duplicate records. One issue is it would be possible to have an unchecked box even if the linked record was already created, which could be confusing for users.

I didn’t know conditional logic was coming for automations, that’s exciting. Any word on if they will increase the number of automations?

I recommend using a single select field instead of a checkbox, with two values: “Create Linked Record”, and “Done creating linked record”. Initially this field will be blank. Then the user will change the value to “Create Linked Record.” This triggers the automation script. The automation script checks if there is a linked record, and only create the linked record if there isn’t one. The script also changes the single select to “Done creating linked record.” This way users are less likely to reset the single select, the way they would uncheck a checkbox. If the user does change the single select again, the script will simply change the single select back.