I have an app with an action that updates the...

workflow
(Lauren Schmidt) #1

I have an app with an action that updates the STATUS field to “closed” when the action button is pressed. I would like to create a workflow rule that sends an email to ONLY that specific customer whose order has been processed aka moved to “Closed” status. I have created a workflow rule, but when I move an order to “Closed” via the action button, a confirmation email gets sent to ALL orders with a “Closed” status.

Could someone please help me figure out how to send an email to only the single record that has been changed?

(Philip Garrett) #2

@Lauren_Schmidt

Your workflow rule appears to do exactly what you described.

How did you detect that “confirmation email gets sent to ALL orders with a “Closed” status”?

If you are testing the rule using the “Test” button that is exactly what will happen because the “Test” button invokes the rule one time for each row in the “Orders” table.

That will not happen when you update an individual Orders record through the Action button. In that case only a single Orders record is updated, and an email will only be sent for the update record.

One excellent way to check you workflow rule is to use the Audit History as described here help.appsheet.com - Troubleshooting Workflow Emails Troubleshooting Workflow Emails help.appsheet.com

(Aleksi Alkio) #3

I believe the option “Send to” is not correct. This will send the email to all customers in your Orders table. Am I correct?

(Philip Garrett) #4

@Aleksi_Alkio

Good catch Aleksi. I missed that.

(Aleksi Alkio) #5

Four eyes normally see more than two :slight_smile:

(Lauren Schmidt) #6

@Philip_Garrett_Appsh

@Aleksi_Alkio Thank you both!

I was able to get the workflow to work by changing the condition to: [_THISROW_Before].[Status]<>[_THISROW_AFTER].[Status]

And the Send to: [Email]

A new twist, though, I added an additional workflow that is set almost identical to my Order Status workflow, but is keyed off a change in another field.

The condition is: [_THISROW_BEFORE].[Reject Order?]<>[_THISROW_AFTER].[Reject Order?]

The problem: A change in my original workflow rule now sends TWO emails to a respondent at the same time: One stating that their order is ready and another that their order has been rejected. Why would my original action cause two emails to now send out when the workflow rules for the email look to be different?

(Aleksi Alkio) #7

You should probably use the expression like AND(ISNOTBLANK([Status]),[_THISROW_Before].[Status]<>[_THISROW_AFTER].[Status]). Otherwise it will send the email if Status is blank.

(Lauren Schmidt) #8

@Aleksi_Alkio This solution worked! Thanks so much!