Save a pdf from multiple tables

Hello,

We run a shop that makes custom signs. Even though we may have multiple products each products is custom made and therefore gets custom specs.

I have created an app that has multiple tables that store data for various things. They are all connected via 1 common column. Let’s call it “JOB INFO”

I have a table, CLIENT INFO, that is connected to all other tables.

Table CLIENTS has the client name, address, etc.

Table JOBS has info on jobs that a client may have such as budget, locations, etc. Client may have multiple jobs.

Table PRODUCT1 gets populated if product1 is selected from CLIENT INFO table with relevant specs for this product.

Table PRODUCT2 gets populated if product2 is selected from CLIENT INFO table with relevant specs for this product.

Then i have a table DESIGN for relevant design info on that job.

I am trying to have a button that we can press to generate a necessary form with relevant data from multiple tables at once. How can i do that?

Thanks,

Hi @Kamalov are you wanting a “Form” with questions to collect data or are you wanting to Report the collected data?

1 Like

@Kamalov For helping other community members it would be good to know what kind of table structure you have. I presume you are using Ref columns. Is the structure like this…
#1 - Client is a parent record
#2 - Job is a child record for the Client and client can have multiple jobs
#3 - Product1 is a child record for the Job (same with Product2)
#4 - Design is a child record for the Job as well
What I don’t know… where is your “Job Info”. Is it a separate table?

@Lynn I want to be able to print/save a pdf files with collected data.

@Aleksi “JOB INFO” is a colum in “CLIENT” TABLE. I am attaching 3 photos for your reference. Hope it helps.

Anyone?

As long as the tables are references you can display related records in a single template using Template Start expressions. If you auto generate a template that has ref columns you should see them in the template to start. From there format as you see fit

Thank you. I will try that out. How can i have a button that can trigger this and possibly more than once? What i mean is i go an save/print that data today but then go back and do it again tomorrow.

Read up on Actions as well. This will accomplish what you want to do. The sample app and this literature is a good place to start

Elijah is correct.

For more details see topic " Sending Email from an Action Button" in this article https://help.appsheet.com/behavior/workflow-introduction/workflow

Thank you guys. It helped and i got it to create a pdf.
I am having an issue though. So we have multiple sign types that a client can have. Each sign type has its own tables because each sign would have its own specs bases on the type.
When i am generating a pdf it has all sign types as their own related tables even though only 1 will have info.
For example CLIENT A wants SignTypeA and therefore that table has all the info in it. SignTypeB and SignTypeC tables have no rows for this client. How can i have the pdf only show relevant info?

Thanks

You could use If: EndIf expression. If that sign is blank, it will remove that line from your template.

Thanks, Aleksi. Would i do that in the GoogleDoc template?

Correct

is this correct?

<<If: [Sign Type] = “SignTypeA”>>
SigntypeASpec: <<[SignTypeASPec]>><>

<<If: [Sign Type] = “SignTypeB”>>
SigntypeBSpec: <<[SignTypeBSpec]>><>

and so on?

It seems that EndIf are missing.

Sorry. So is this correct?

<<If: [Sign Type] = “SignTypeA”>>
SigntypeASpec: <<[SignTypeASPec]>><>

<<If: [Sign Type] = “SignTypeB”>>
SigntypeBSpec: <<[SignTypeBSpec]>><>

or do i just have 1 EndIf at the end?

It keeps removing endif when i type it in