I have an action button that edits 3 fields (...

(David Barbosa) #1

I have an action button that edits 3 fields (which results in 3 changes that need to be synced), and a workflow that sends an email when the value in one of columns changes. I use the ThisColum.Before and ThisColumn.After to check if it has changed.

The issues is that the workflow is sending 3 emails out for each of the values being changed, but I only need one email to go out. My users are complaining about the multiple emails. Can someone please help me to fix it so only one email gets sent by the workflow?

The workflow rule is: [_THISROW_BEFORE].[Approved]<>[_THISROW_AFTER].[Approved]

(David Barbosa) #2

Hey Aleksi,

Thanks for the quick reply. I’m not sure if that will help. Let me elaborate on what’s going on with my app.

This particular app is a TimeClock app that a supervisor uses to approve times for employees. The action button changes the following fields:

[Approved By] = USERNAME() [Approved Date] = TODAY() [Approved] = “Yes”

When the action button gets clicked, it automatically updates these three fields to the values I listed above.

The workflow looks to see the [Approved] column has changed from “” to “Yes”. However, for some reason, it is sending three e-mails. I’m guessing the other two fields being changed are somehow triggering the workflow to execute. I am having trouble figuring out how to make it only execute for the change in the [Approved] column.

(Aleksi Alkio) #3

Combine these three columns with one virtual column and use that in your workflow rule. Another workaround is using the counter or one workflow rule like…


(Aleksi Alkio) #4

The reason is this… First two actions fire the workflow because the [APPROVED] field is blank before the 3th action. When the evaluation [APPROVED]<>[APPROVED] is fired and both values are blank, the evaluation is TRUE. This is reported issue and Appsheet is trying to fix this.

If you add another evaluation like ISNOTBLANK([APPROVED]) into your workflow rule, it won’t fire more than once.

(David Barbosa) #5

Ahh! Genius workaround, the ISNOTBLANK solution should work perfectly. I’ll implement and let you know how it goes. Thanks!!

(Philip Garrett) #6


Aleksi is correct. as always.

I have updated the documentation to reflect this limitation. See topic “Sending Email When a Row is Updated to Have Specific Values” in this article help.appsheet.com - Triggering Email, SMS, or Notifications from the App

We hope to change the behavior, but there are compatibility issue if we do this.

Triggering Email, SMS, or Notifications from the App help.appsheet.com

(David Barbosa) #7

Aleksi always comes through with great solutions and in a timely fashion! Thanks again! It worked flawlessly!!

(Aleksi Alkio) #8

You’re welcome