New Bug Encountered: Workflow Emails are NOT being sent as of 2 days ago

Hi as of monday of this week emails are not been sent. We have a workflow that gets triggered when an order is updated. Looking at the log it states the following but we have not made any changes to the app.
The error stated in the log is:

“Errors”: “Error: Workflow rule ‘Email Order’ action ‘Save a copy’ Body template. Expression ‘[TotalLinea]’ is invalid due to: Unable to find column ‘TotalLinea’, did you mean ‘TotalOrden’?.”,

Properties:
 {
  "AppTemplateName": "CocinaCaseraDB-811278",
  "AppId": "222d66bc-c33a-41e3-85dd-f25caeaff3d5",
  "AppTemplateVersion": "1.000705",
  "RuleName": "Email Order",
  "EventType": "Change",
  "InvokedBy": "Update",
  "Server": "prodv2-lb-9",
  "TableName": "EncabezadoOrdenes",
  "RuleTableName": "EncabezadoOrdenes",
  "OperationUpdateMode": "UPDATES_ONLY",
  "EventMatch": "Workflow event successfully matched",
  "Condition": "=[Confirmada]=True",
  "MatchesCondition": "True",
  "ActionNotPerformed": "1 errors present.",
  "ActionResults": "Created 1 ActionResults",
  "Action Name": "Save a copy",
  "RecordedAt": "2019-07-18T02:07:25.4852613Z",
  "Errors": "Error: Workflow rule 'Email Order' action 'Save a copy' Body template. Expression '[TotalLinea]' is invalid due to: Unable to find column 'TotalLinea', did you mean 'TotalOrden'?.",
  "DocName": "Attachments/ORD_vg60huek_Cus_James McFarlane20190718_020725_485.pdf",
  "FileName": "/appsheet/data/CocinaCaseraDB-811278/Attachments/ORD_vg60huek_Cus_James McFarlane20190718_020725_485.pdf",
  "MimeType": "application/pdf",
0 7 531
7 REPLIES 7

Steve
Participant V

Does the TotalLinea column exist in the EncabezadoOrdenes table?

HI Steve,

It does not exist in that table, EncabezadoOrdenes - this is the order header table.
It does exists in the DetalleOrdenes Table - this is the order detail table.

Hi James,

I looked at the failing template and the error being reported seems correct. Please correct me if I am mistaken.

Under the heading “Platos”, your template contains a table with two columns.

The left column contains:
<<Start: [rDetallesOrden]>> <<[Cantidad]>>x <<[Producto]>><<[Notas]>> << End >>

The right columns contains:
<<[TotalLinea]>>

The << Start >> and << End >> expression is entirely contained in the left column. The << Start >> expression in that column refers to table “DetalleOrdenes”. As a result you can refer to fields in table “DetalleOrdenes” between the << Start >> and << End >>. For example, the references to fields “Cantidad”, “Producto”, and “Notas” are valid.

The reference to field <<[TotalLinea]>> in the right column is outside the << Start >> and << End >> expression, so it cannot refer to a field in table “DetalleOrdenes”.

I recently improved template error checking. It is possible that this error is now being detected, when it was not previously.

Hi Phil,

The template is for an invoice that has a header and a detail section. The field in question <<[TotalLinea]>> is the line total for the detail part, it is the product of multiplying the Cantidad “Quantity” by the Unit Price (not shown). What I find strange is that I have not made any changes to the app in weeks and it was working fine last week. What do I need to fix for it to work or is it on your side?

Thanks,

James

Hi James,

I am a little lost at this point. Is the problem resolved or do you need more help?

Hi Phil,

I was trying to get it to work but I have not been able to resolve the issue. Can you please help?

Let’s start by fixing the obvious problem.

Rule “Email Order” has an attachment template containing:

Platos:
<<Start: [rDetallesOrden]>> <<[Cantidad]>>x <<[Producto]>>
<<[Notas]>> << End >

The last line is missing the second >
It should be:

<<[Notas]>> << End >>

Top Labels in this Space