Workflow not send emails

Goodnight,

I am creating an application and my workflow does not send the emails, I create a behavior which has an initial state of “open” and with the behavior it goes to “completed” my rule does not send the emails and I have a pro account and the project is deployed, thanks for your attention.

If u navigate to workflow sections of u press LOG BUTTON is there any error?

Hi, I get the following error:

Properties:
{
“AppId”: “8822662a-8754-4f90-8f84-5f7d17622d5c”,
“AppTemplateVersion”: “1.000135”,
“RuleName”: “OrderUpdateRule”,
“EventType”: “Change”,
“InvokedBy”: “Update”,
“Server”: “produ99110000J0”,
“IgnoreSecurityFilters”: false,
“TableName”: “Orders”,
“RuleTableName”: “Orders”,
“OperationUpdateMode”: “UPDATES_ONLY”,
“EventMatch”: “Workflow event successfully matched”,
“Condition”: “=AND( [Estado]=“Completado”, [_THISROW_BEFORE].[Estado] <> [_THISROW_AFTER].[Estado] )”,
“MatchesCondition”: “True”,
“ActionNotPerformed”: “3 errors present.”,
“ActionResults”: “Created 1 ActionResults”,
“Action Type”: “Email”,
“Action Name”: “Action 1”,
“Errors”: “Error: Workflow rule ‘OrderUpdateRule’ action ‘Action 1’ Attachment template. Expression ‘SubTotal’ is invalid due to: Expression ‘SubTotal’ could not be parsed due to exception: Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index… Error: Workflow rule ‘OrderUpdateRule’ action ‘Action 1’ Attachment template. Expression ‘Descuento’ is invalid due to: Expression refers to undefined field. Error: Workflow rule ‘OrderUpdateRule’ action ‘Action 1’ Attachment template. Expression ‘IVA’ is invalid due to: Expression refers to undefined field.”,
“EmailTo”: “”,
“EmailCC”: “”,
“EmailBCC”: “”,
“EmailFromDisplay”: “”,
“EmailReplyTo”: “noreply@appsheet.com”,
“EmailPreHeader”: “Factura de Venta”,
“EmailSubaccount”: null,
“EmailSubject”: “Factura de Venta - William J - Ced/Nit: 1,094,988,415 - 10/17/2019 9:05:26 AM”,
“EmailTitle”: “Alert: Update to application ‘App Toma Pedido’ table ‘Orders’”,
“EmailAttachment”: “Name: ‘Factura de Venta - William J - Ced/Nit: 1,094,988,415.pdf’ Archive: AttachAndDoNotArchive FileName: ‘’ MIME Type: ‘application/pdf’ PageOrientation: ‘Portrait’ PageSize: A4 AttachmentByteLength: 0 AttachmentTextLength: 26163 PDFCount: 1”,
“EmailOtherAttachments”: “”,
“AppTemplateName”: “test1-1102311”,
“Operation”: “Workflow action”,
“Result”: “Failure”
}

Thank you for your cooperation

Expression ‘SubTotal’ is invalid due to: Expression ‘SubTotal’ could not be parsed due to exception: Index was out of range. Must be non-negative and less than the size of the

Etc etc…u have problems with formulas in email template…just correct them

hello this is my expression in the template, I don’t know how to correct it.

<<Start:[Related Order Details]>><<[Producto].[IdProducto]>>
<<[Producto].[P_IVA]>>
<<[Producto].[Nombre]>>
<<[Cantidad]>>
<<[Descuento]>>
<<[Producto].[Precio Unidad]>>
<<[SubTotal]>>
<<[IVA]>>
<><>

There are two independent problems.

The error message “Error: Workflow rule ‘OrderUpdateRule’ action ‘Action 1’ Attachment template. Expression ‘SubTotal’ is invalid due to: Expression ‘SubTotal’ could not be parsed due to exception: Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index…” is occurring because of an AppSheet bug.

The name “SubTotal” is an Excel function name. When we attempted to parse that name we treated it as a Excel function and expected it to be followed by parenthesized argument list. I have fixed that problem. If testing goes well, that change should be released on Friday afternoon Seattle time.

After that bug fix is released, you will begin seeing the proper error message which is:
“Error: Workflow rule ‘OrderUpdateRule’ action ‘Action 1’ Attachment template. Expression ‘SubTotal’ is invalid due to: Expression refers to undefined field.”

You are seeing the undefined field name errors for fields “SubTotal”, “Descuento”, and “IVA” because your attachment template is incorrect. These three fields reside in table “Order Details”. These three fields are referenced in two places in your template. The first reference to these fields is inside the << Start >> expression, which is valid. The second reference to these fields is outside the << Start >> expression near the bottom of your template. The second reference is invalid because the current record at that point in the template is the “Order” record. The “Order” record does not contain these three fields.

2 Likes

I forgot to say that if you fix the template problem described in the last paragraph, you can circumvent the first problem I described.

2 Likes

Thanks for the help, with your recommendations I solved my problem and the application already works fine.

2 Likes

Glad to hear that it is working.

1 Like

Good
morning, I just received an message from appsheet that says that I will cancel
my app for exceeding the number of users, in the information of the app it says
that four users of those two appear in the app and should only leave two, I
want to know how definitely delete those two users since they do not use the
app and that appsheet does not close my application. Thank you

Please contact support@appsheet.com directly for help.

1 Like