Columns not found in child record in template

I am experiencing an error when trying to "print" a child record in a template. I have an automation set up to email the user a PDF of an inspection record when the click an action button. The template worked correctly for the base record. This record in the table "Inspections" also has an action button to create a child record in the table "aInspections" that is a copy of the original that can be edited and saved as an amendment to the record. The columns in "aInspections" are the same as the ones in "Inspections" except for the additional columns [AmendedBy] and [aDateTime] which records who made the amendment and the time. In the template a duplicated the same template from "Inspections" onto a second page and wrapped it in <<Start: [Related aInspections]>> and <<[End]>> at the end of the template. I also included after the start expression - Record Amended By: <<[AmendedBy]>> <<[aDateTime]>>

When I ran the automation like this I received the attached PDF and the "Inspections" record prints correctly, however, the related "aInspections" record does not. It correctly displayed the columns <<[AmendedBy]>> and <<[aDateTime]>>. Every other column between the Start and End displayed the original column value from the parent record. In an attempt to fix this I changed the column names for the child record so they do not match the parent record, they all have an "a" in front of the column name. Now when I try to run the automation it fails because it can not find the column names and the monitor is suggesting the column names from the parent record.

Template is in .docx format and the <<Start>> and <<End>> expressions for the Related aInspections template are contained in the same table.

Link to the template 

 

 

Solved Solved
0 9 178
1 ACCEPTED SOLUTION

Move your <<End>> so it will be out of the table. Now it's inside of it where as the Start: is not.

View solution in original post

9 REPLIES 9

Da Sie 2 Tabellen in der Vorlage ansprechen, sollte man sich mit [_thisrow-1] auseinander setzen. Hier mal ein Erklรคrvideo: Erlรคuterung [_thisrow] in Vorlagen 

I don't think this is the issue here, unless I am misunderstanding how [_THISROW-1] works. It is my understanding that I would use [_THISROW-1] to reference the Parent table from the Child table. In this template I simply want it to print the Parent record in it's entirety, then to print the Child record in it's entirety. 

Can you provide a screenshot of the actual error the automation encounters? I have a similar setup of identical column names in two different tables and my template works just fine.

Attached below are 2 screenshots of the automation monitor. The first screenshot is the Start with unmatched End which is triggered if I place the Start, End, or both outside of the table. 

After placing the Start and End inside the table the automation ran successfully, however, it pulled the values from the columns of the parent record for both tables. Thinking that this may be due to the fact that the columns in the parent table and child table had the same name, I renamed the columns in the child record, regenerated the table data, and updated the template so the columns in the child record template matched the new column names. The second screenshot is the error that occurs when I run the automation with this new template.

I am confused by this because 2 columns from the child record do not throw an error. <<[AmendedBy]>> and <<[aDateTime]>> do not throw an error, however, every other column in the child record does. Based on the suggestions from the error it is looking at the parent record for columns still instead of the child record.

 

Error when START and END are outside tableError when START and END are outside tableError when START and END are inside tableError when START and END are inside table

One additional thought. Not knowing what your datasources are, but if you edited column names in your spreadsheet/database, did you regenerate the table in Appsheet?

Move your <<End>> so it will be out of the table. Now it's inside of it where as the Start: is not.

The <<Start: >> is in the table, the outer edges of the table are hidden (white). If I move the <<End>> outside of the table I get the error Found a Start with unmatched End.

This was the correct answer. It appears it was confused where the Start expression was in regards to the table location. I placed the end outside the table and placed the start before the page break and it worked correctly.

Good that you were able to solve it!

Top Labels in this Space