New Bug Encountered: Action not firing consistently

Hi everyone, I have an issue with an action not firing consistently causing missed customer quotes from going out for my client. The issue has been reported and confirmed by AppSheet but they’ve advised “We’re going to add more logging, but without the ability to consistently reproduce the error, there’s not a lot more we can do.”

I really need to get a solution pulled together for this client as they’re losing faith in the system. Is there any other way you can think of to set the value of a column after it has been saved in order to trigger a workflow?

Any help would be greatly appreciated! Thanks

You need to set a columns value in order to trigger a workflow? So you want the workflow to happen when a record is edited? Can you describe your goal a bit better, I’m afraid there’s not much to suggest without knowing more details?

Hi Marc, I have a quoting tool configured as below:

1.I have an action that will change the Quote Stage to In Process On save.
2.An UPDATES ONLY workflow is triggered when the Quote Stage is set to In Process. It sends an email with the quote content and then completes a number of other updates to the row after the email is sent.

When I initially set the workflow to run immediately after the quote was saved (ADDS ONLY) with no “In Process” condition, the system sent the email before the associated Quote Details (products data) was completely saved so users received a blank quote.

If the action only sets the column value on a form save, you could instead try to set an Initial Value and Reset on Edit formula to suit your needs.

Or another option would be to setup the workflow to trigger off of some other change (something else that is changing at the same time?), and have the workflow include the data change action you already have.

Thanks Marc

One way is if you add an action into your Parent table’s form view. When you save the parent & child records, the action will be the last one of this process. Then the email/workflow will have all saved child records as well.

Sorry Aleksi, just want to make sure I understand. Do mean create an On Save action for the Quote Detail (child) form that changes the Quote Header (parent) Quote Stage field to “In Process”?

Hi Aleksi, can you help to clarify your idea on this one? The action I currently have saved on the Parents form view is the update field to “In process”. Are you saying I should a grouped action and include another action with the In Process one - like “go to another form”. And in the grouped action run the go to another form first and then run the In process action?

A million thanks!

@Daisy_Ramirez Please check the sample app “Parent Workflow” from https://www.appsheet.com/portfolio/531778

Thanks Aleksi. Sorry for not understanding but how does it differ from updating the field to “In Process”? How are we ensuring the child table records are saved? I don’t see an action associated with the child table.

The action is in parent record.

Ok yes, I thought there would be another for the child. This is similar to the action I have setup already except that its updating the Quote Stage field to InProcess of the parent table vs. PDF_SENT to Now() but my email doesn’t include the child records. How would this ensure the child records are saved? Just want to understand.

The action in parent table is triggered after all child records are saved.

1 Like

Ah ok. So it appears I’m in a sense doing the same by updating the Quote Stage field to "In Process. You’d probably have the same issue with inconsistency if the PDF_Sent field just didn’t get updated.

Thanks Aleksi, I’ll keep at it

You’re welcome

Daisy

I had a similar situation before.

But my approach was slightly different. I had a tracker table for all the statuses…

My action would simply ADD a new row to that tracker table…

I never liked ‘update’ workflow triggers… they are inconsistent.

But ADDING rows to tables always seems to trigger workflows consistently they seem to become congested and workflow either never execute or burst out 30min later out of nowhere.

EDIT: I realize you’ll have to really re-do your PDF code to accommodate the fact that you’re doing it from another table … but i guess it’s a small price to pay if the workflows trigger consistently…

A million thanks Alex and I see what you mean. I do have an “Activity” table in place to capture when the Quote Stage was made and added a few more stages to track for this issue but I want to make sure I’ve configured this like you mentioned above since my actions seem to be failing.

*The user inputs the Quote Header (parent) with Details (child), then presses Save
*I have an On Save action on the Quote Header that runs a grouped action.
*The grouped action, 1) creates the activity record to table “Activity”, 2) updates the Quote Stage field in Quote Header to “In Process” and then 3) *creates another activity record for the new stage “In process”

I implemented this yesterday morning and have been monitoring client records as they’re posted. The activity tracking would tell me which actions of the grouped action didn’t process - I thought it just didn’t like the stage change. Since there’s no data in the activity tracking table at all for some of the quotes it appears the entire action never fired at all.

Is this how your scenario is set?

@Daisy_Ramirez

So here’s how i would handle this:

3 Tables:
Quote MASTER (for the quote header info)
Quote DETAIL (for the quote line items data)
Quote STATUS (linked to the MASTER table with an ENUM field called STATUS … which would include all the statuses you want to track that MASTER entry with)

Step 1) CREATE QUOTE > Workflow 1 >> Triggers on the addition of NEW ROW to (let’s call it) QUOTE MASTER table.

Note: At this point i would have a one VC with an if statement: IF(ISBLANK(Related Quote STATUSs),“New”,MAXROW(“Quote STATUS”,“Timestamp”,([QUOTESTATUS_UID] = [_THISROW].[QUOTEMASTER_UID]))

That way I can create Slices … do reporting etc etc on that Master QUOTE… Based on a quote’s status.

Needless to say - we’re going to be using the addition of the QUOTE Master itself as the trigger… (If you want to fire out PDFs at this stage be careful though… this might have a wierd effect if you make the QUOTEMASTER_UID ref column a ‘Part of’ the Quote MASTER table… the sequence of events will change to A) New Master Entry B) Trigger C) Addition of DETAILS… Your PDF will be missing the children. There’s ways to handle this…)

Step 2) Move Quote MASTER to ‘In Progress’ > Create action that adds a new row (here’s your trigger!!) to another table based on the data from this table.

Note: The action will simply add a new row to our STATUS table causing a Trigger and instantly changing the status of the Quote MASTER entry since we now have that VC in place.

**Step 3) ** Rinse and repeat for other statuses…

Sorry for the ramble - hope the above makes some sense.

Hi Jon, aha! I get what you and Alex are doing here. I’d like to test this over the weekend when the client is out so I’ll probably run through this a few times and reach out if there’s a question.

I thinks this might be it!

Thanks Jon and Alex!

Hi Jon, hope all is well. I configured the scenario above and although the add row to Activity table action worked, it looks like my CREATE QUOTE workflow (email_quote_prospect) did not fire based on the audit trail. Could it be my VC formula? My guess is the system didn’t have time to calculate the vc formula and the Condition was therefore false?

*** Audit Trail**

*** Quote Master workflow for Add Only**

*** VC Formula =**

IF(ISBLANK(Related Activitys),
“Pending”,
LOOKUP(MAXROW(“Activity”,“Date Time Entered”,AND([Reference] = [_THISROW].[quote_id],[Type]=“Quote”)),“Activity”,“activity_id”,“Status”))

Table Cross References:
Quote MASTER = Quote Header
Quote DETAIL = Quote Detail
Quote STATUS = Activity

I think we’re onto something here. Thanks Jon