Email report error: The parent is missing


since last 28th of May I’m experiencing the following error on all email reports from one particular workflow email reports that my app is generating once a certain condition comes true.

This particular workflow email report was doing fine until 27th of May.
No changes were done to the template on that date. The template is still reachable today with no problem.

All other workflow email reports are doing fine.

The error reported on the logging section of the app is as follows:

“Error”: “Error: Workflow rule ‘rule name’ Attachment template. Template could not be loaded due to exception: The parent is missing.”

No further info is shown, which makes it difficult to debug.

Any idea or changes produced on appsheet which I should take care on my workflow template?

Thanks in advance

Try to remove that template from your Workflow and then bring it back.

The workflow works well without the template, but the same error appears again once the template is brought back as an attachment.

“Errors”: “Error: Workflow rule ‘rule name’ action ‘Action 1’ Attachment template. Template could not be loaded due to exception: The parent is missing.”

Any recommendation to better understand / debug what the “missing parent” is?

It sounds it could mean parent record. Do you have child records in this template?

Yes. There are several type of child records:

Related ServiceDays [ServId]
Related ServiceMaterials [ServId]
Related ServicePhotos [ServId]

Note ServId is the ID & key for the parent record

Are you able to share that template… printscreen would be enough I belive.

starting from top to bottom on the template here you have snapshots of what is included:

Info of the parent record, but also some of related child records:

Info of the parent record, and a query to referenced table:

Child “A” records related to the parent record. Also some count() related to child records:

Child “B” records:

Footer of the report wit hparent record data (i.e.: [Comments], [Recommendations], etc.) app global variables :

And finally some fotos from the Child “C” records (if included):

At the moment I keep some text that will be latter on modified to become additional fields, but it should not affect for now as all these fields do not have any << >> characters to delimitate the fields:

Let me know if you would prefer me to share the template link in private

Those missing <<>> can be the reason. Try to temporarely remove them and then make a new test.

I have removed the unbracketed code, but obtained the same results: no workflow email is generated and the same error

Any further guess on what may cause it to not merge with the template?

@Phil Any thoughts what else the error could indicate?

Hi Oscar,

It may be a change I made. I recently improved the way workflow templates are parsed. It is possible I introduced a problem when doing that.

I can investigate if you provide:

  1. Your account id
  2. The app name
  3. The workflow rule name

I have been comparing the vector of values indicated in the failed sync and found out the order of some fields in the debug log does not match the order of fields in the table within the Drive spreadsheet and app.

The differences of fields was in the last few values located right before the “Related fields” which are not included in my spreadsheet.
On my spreadsheet and app, the last 12 columns are calculated with a formula in the spreadsheet, which at the time of syncing appear as “[sync to compute]”

Order of fields within the app and spreadsheet:

In the debug log (failed record), the fields are listed as follows (I’ve only listed starting at the “NumberEdits” till the end):

“[sync to compute]”,
“[sync to compute]”,
“[sync to compute]”,
“[sync to compute]”,
“[sync to compute]”,
“[sync to compute]”,
“[sync to compute]”,
“[sync to compute]”,
“[sync to compute]”,
“[sync to compute]”,
“[sync to compute]”,
“aJu3p8s9”, (corresponding to the “Related ServiceDays”)
“”, (corresp. to the “Related ServiceMaterials”)
“08/01/2019”, (corresp. to the “Warranty Ends”)
“”, (corresp. to the “Related ServicePhotos”)
“[sync to compute]” (provably corresponding to “TotalPhotos”)

As you may see, there is one of the 12 computed fields ("[sync to compute]" most provably the “TotalPhotos”) which appear on a different position.

I assume it is due to that field has a formula related to the spreadsheet formula as below, related to the ServivePhotos, but not sure:


I have no other ideas where to inspect to any further level…
Any guess?

Hi Phil
Here you go:

  1. account id: I assume it is 91404?
  2. app name: “Service-91404”
  3. workflow rule name: “Field Service Report” / “Action Name”: “Action 1”

Let me know if you need any additional info

Hi Oscar,

I have found two issues that are affecting your attachment template.

The first issue is in the cell containing the following value:

[ServId] = [_THISROW].[ServiceId], TRUE))>>

Please remove the carriage return following the comma that ends the first line and before the start of the second line.

The second issue is a bug in my new template parsing code. It cannot handle the cell in your table that contains a Start and End in the same table cell. To circumvent that, I am going to return your account to use the old template parsing code. That change will take effect when we deploy in the next hour or so. Once that happens, your template should start working again.

Once I have fixed my new template parsing code to handle your table that contains a Start and End in the same table cell, I will return you to the new template parsing code.

Sorry for the problem I caused you.

Hi Phil
It works again now, even without removing the carriage return yet.
Thanks for your great support!


I fixed the underlying problem last night. You will be back on the new template parsing code when we deploy this afternoon. Please fix the carriage return problem before then.

Thanks Phil

I did the change already, so it should be ok once your change is being deployed

Thanks again for your support!

Thanks Oscar.