Trigger Workflow With A Simple Action Button

*This tip will let you trigger a workflow without having to double back and clear the trigger column.

Let’s create an action to trigger a workflow that sends an email.

  1. First, every table I create has a hidden trigger column, type text.
  2. Second, let’s create a simple data change action for the table that we want to trigger on with the following expression: CONCATENATE("UNIQUE_KEY_WORDS", " - ", NOW())
  3. The key word can be anything you want, but you’ll want it to be unique and descriptive to what you’re trying to accomplish. So if I’m sending a project summary email, I might make it PROJECT_SUMMARY_EMAIL
  4. Third, in our workflow condition expression use the following:
    AND(
    [_THISROW_BEFORE].[trigger]<>[_THISROW_AFTER].[trigger],
    STARTSWITH([trigger], “UNIQUE_KEY_WORDS”)
    )

This ensures that we can use our trigger column for many different types of triggers, and that we can also trigger the same workflow over and over without needing to double back and clear the trigger.

11 Likes

While I prefer to clear the trigger column, this way there’s no ambiguity around when a workflow should be triggered or not, this method provides a sort of history for what the last trigger was; nice one!

2 Likes

I generally prefer any method that has less moving parts/data changes.

Clearing the trigger method would be three actions, and two table record updates.

We often carry SQL change/history tables, so the second update to clear the record creates a “non-user” created second record update in the change table, useless… I should experiment with marking the trigger column to “reset on edit,” but it’s not really necessary. (Try to get the trigger history record to only show up for the person that used it, so I could get a history of workflow triggers)

2 Likes

Just two actions, and one update:

  • Set the value
  • clear the value

Since we can do multiple steps inside workflows, the first step I do is to clear the trigger inside the workflow - this means the only edit made to the row that we see in the app is the push of the trigger - everything else happens with the workflow.


I’m with you 100% about less moving parts.

Nice use of StartsWith() BTW partyparrot (Appsheet)

1 Like

Ahhh, yes, yes.
It’s still two database updates.
:stuck_out_tongue:

1 Like