Running an Email Report

Hi,

I am trying to get an email report to run for a slice. I have created a template for it, however I am wondering if my โ€œIFโ€ expression is wrong. I currently have it set to โ€œISNOTBLANK(โ€œvalue_0โ€)โ€ for my slice, and I am not receiving any emails when I press run. Should the value of the expression be something else.

Solved Solved
0 10 1,262
1 ACCEPTED SOLUTION

Remove the square brackets surrounding โ€œEndโ€.

View solution in original post

10 REPLIES 10

What are you seeing in the Audit History as described in this article https://help.appsheet.com/en/articles/961739-troubleshooting-workflow-emails

The Audit History is always the first thing to check when a workflow rule or report is failing.

It saying there is an unmatched start:

Properties:
{
โ€œAppTemplateNameโ€: โ€œNewApp-983543โ€,
โ€œAppIdโ€: โ€œ7216ecbf-26d1-4a4c-bd74-8e81643585d4โ€,
โ€œAppTemplateVersionโ€: โ€œ1.000331โ€,
โ€œRuleNameโ€: โ€œKensingtonโ€,
โ€œEventTypeโ€: โ€œScheduledโ€,
โ€œInvokedByโ€: โ€œEditorRunButtonโ€,
โ€œServerโ€: โ€œprodv2-lb-3โ€,
โ€œEventMatchโ€: โ€œWorkflow event successfully matchedโ€,
โ€œConditionโ€: โ€œ=ISNOTBLANK(โ€œvalue_0โ€)โ€,
โ€œMatchesConditionโ€: โ€œTrueโ€,
โ€œActionNotPerformedโ€: โ€œ5 errors present.โ€,
โ€œActionResultsโ€: โ€œCreated 1 ActionResultsโ€,
โ€œAction Nameโ€: โ€œKensington Emailโ€,
โ€œRecordedAtโ€: โ€œ2019-07-19T20:45:32.3254283Zโ€,
โ€œErrorsโ€: โ€œError: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensington Emailโ€™ Body template. Found 1 unmatched โ€˜Startโ€™. They are: <p class=โ€œc0โ€><span class=โ€œc14โ€><<Start: FILTER(Kensington, true)>>

Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensington Emailโ€™ Body template. Expression โ€˜Start: FILTER(Kensington, true)โ€™ is invalid due to: Unable to find function โ€˜START: FILTERโ€™. Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensington Emailโ€™ Body template. Expression โ€˜OrderBy(SELECT([Patrol Action], [Time], [Tech]))โ€™ is invalid due to: Unable to find column โ€˜Patrol Actionโ€™. Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensington Emailโ€™ Body template. Start expression โ€˜OrderBy(SELECT([Patrol Action], [Time], [Tech]))โ€™ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the โ€˜Keyโ€™ column of the referenced table. Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensington Emailโ€™ Body template. Start expression โ€˜OrderBy(SELECT([Patrol Action], [Time], [Tech]))โ€™ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the โ€˜Keyโ€™ column of the referenced table.โ€,2X_1_1931912b7ab6f436e6d86129340677de82227919.png

Above is an upload of the template I used.

You are missing the << END >> in the last cell of the row.
<<[Tech]>><< End >>

Added the <>

  1. Itโ€™s saying โ€œcan not find the column [Patrol Action]โ€ yet it is there on the table.
  2. Changed Start: FILTER to Start: Select-says do you mean โ€˜Selectโ€™
  3. Should generate a list of reference values-I am pulling the values from the referenced table so I donโ€™t quite understand that one?

You may have more than one problem in your template, but that is definitely a problem.
Try fixing that problem and see if there are other problems in your template.

When you save your application in the Editor, you should choose the โ€œSave and verify dataโ€ option.
That will ensure that the templates are verifies when you do the save.

Try the following:

  1. Delete โ€œ<<Start: SELECT(Kensington[Properties], true,true)>>โ€
  2. Delete โ€œ<<Start:OrderBy(SELECT([Patrol Action], [Time], [Tech]))>>โ€
  3. Delete the two occurrences of โ€œ<< END >>โ€ at the bottom
  4. In the first cell of the table put โ€œ<<Start: Filter(Patrol, true)>><<[Patrol Action]>>โ€

Made the changes and I got this error result:

Errors": โ€œError: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensingtonโ€™ Body template. Found 1 unmatched โ€˜Startโ€™. They are: <p class=โ€œc19โ€><span class=โ€œc6โ€><<Start:Filter(Patrol, true)>><<[Patrol Action>>

Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensingtonโ€™ Body template. Expression โ€˜Start:Filter(Patrol, true)โ€™ is invalid due to: Unable to find function โ€˜START:FILTERโ€™, did you mean โ€˜FILTERโ€™?. Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensingtonโ€™ Body template. Expression โ€˜[Patrol Actionโ€™ is invalid due to: Expression refers to undefined field. Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensingtonโ€™ Body template. Expression โ€˜[Time]โ€™ is invalid due to: Unable to find column โ€˜Timeโ€™. Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensingtonโ€™ Body template. Expression โ€˜[Tech]โ€™ is invalid due to: Unable to find column โ€˜Techโ€™. Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensingtonโ€™ Body template. Expression โ€˜[End]โ€™ is invalid due to: Unable to find column โ€˜Endโ€™.โ€,

For reference, the slice name is Kensington
The Columns:
[Patrol Action]
[Time]
[Tech]

condition is set to ISNOTBLANK(โ€œvalue_0โ€)

You did not remove the first << START >> or the final << END >> at the bottom of the template.
In fact, you did not follow step 4 either.

I made the changes as instructed, yet my results still ended in error:
2X_5_5d0a6dfe188423171f7acff18a5e83861910fcda.png

and I ended up with the same result after attempting to run it:

โ€œErrorsโ€: โ€œError: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensingtonโ€™ Body template. Found 1 unmatched โ€˜Startโ€™. They are: <p class=โ€œc8โ€><span class=โ€œc17โ€><<Start:Filter([Patrol], true)>><<[Patrol Actions]>>

Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensingtonโ€™ Body template. Expression โ€˜Start:Filter([Patrol], true)โ€™ is invalid due to: Unable to find column โ€˜Patrolโ€™. Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensingtonโ€™ Body template. Expression โ€˜[Patrol Actions]โ€™ is invalid due to: Unable to find column โ€˜Patrol Actionsโ€™. Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensingtonโ€™ Body template. Expression โ€˜[Time]โ€™ is invalid due to: Unable to find column โ€˜Timeโ€™. Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensingtonโ€™ Body template. Expression โ€˜[Tech]โ€™ is invalid due to: Unable to find column โ€˜Techโ€™. Error: Workflow rule โ€˜Kensingtonโ€™ action โ€˜Kensingtonโ€™ Body template. Expression โ€˜[End]โ€™ is invalid due to: Unable to find column โ€˜Endโ€™.โ€,

Remove the square brackets surrounding โ€œEndโ€.

Top Labels in this Space