Trigger table and source table for PDF template

Hi,

I have got an issue with the source table of the template. I have been trying a lot to solve but I can´t get to the logic of the eror and what could be the source of it.

I have a trigger event on Table A when updating a column. I want to generate a pdf file based on table B (actually a slice on another table). I let Appsheet generate the template; all the columns of the table B are there. When I generate the PDF file though, it seems it retrieves data from table A, ignroring the column names completely.

I have tested the template generation without updating data, so it is not a problem of refreshing data in parent/ child tables, all the data which I expect in the template is already there.

Any idea why I have this issue? could it be that the table for the trigger and the template have to be the same?

Many thanks for your help!

 

0 4 157
4 REPLIES 4

Are you filtering Table B in the template based on the column that changed in Table A? Or do you mean you have Table A in the Event setting and use Table B in the create PDF process? Are you using SELECT() or FILTER() on Table B? Screenshots (redact info you don't want others to see), but we do need some info to attempt to help.

Hi Markus,

sorry, here are more infos/ screenshots.

These are the trigger and Create PDF event respectively.

Julien112_1-1709217314102.png

 

Julien112_4-1709217597357.png

 

I have an action in the view below which swicthes the value of the colum "Test" in the table "Rechnungen" , thus trigerring the action.

Julien112_3-1709217551170.png

The template should retrieve values from a slice from table "Recipients", as displayed in the form in the screenshot.

The template shows me values from the "Rechnung " table though, not from "Recipients" (e.g. the field <<[Anrede]>> in the template returns the value of a column in the "Rechnung" table). FYI the tables "Rechnungen" has no relationship to the table "Recipients".

I just don ´t get the logic behind the template references.

Thanks for your support!

 

I am guessing the 'template' you are referring to is the default template when you click on the 'Create' button in the task settings? Have you tried just clicking the create template button again with the same results? When you say 'shows me values from the "Rechnung" table not from "Recipients"' what do you mean? It looks like your table Recipients has a column [Anrede] so how would it be possible to pull data from Rechnung if there is no relationship between those tables? I would suggest actually looking at your value in this column and maybe determine how that value is set (initial value setting?).

I changed the logic of the trigger to be triggered from the same table which is used for the template. The template works fine then. It does seem that having different tables in the trigger event and template generating event was the issue. It may have been related to the facts that the tables are not linked.

Many thanks for your help, Markus!

Top Labels in this Space