PDF with related two database

Hello to the community,

I have started to develop an application to edit a delivery note. My data is based on a google spreadsheet with 2 sheets:

the first one: "data": with information about the supplier: address, city, email, phone.

The second: "sender": the fields are filled in by the person who wants to send the material.

My application is based on the second sheet. I've added a bot to automatically create a pdf delivery note.

My problem: is it possible to have fields from 2 different tables on the same model?

Because my template only contains fields linked to a second "sender" sheet, but I'd like my template to also contain the suppliers' address, e-mail and telephone fields.

I've been trying for 2 days but I'm stuck.

Thank you and have a nice day

Solved Solved
0 14 309
1 ACCEPTED SOLUTION

As Julio35 explained, since you have a ref column, you can just dereference it.

[ref-column].[value-column]

More detailed info in the link below
Dereference expressions - AppSheet Help

View solution in original post

14 REPLIES 14

Hello @arnaudv ,

I would say that yes, it is possible. However, it is important to know how the tables are somehow structured.

  • Are they related with some "ref" columns?
  • If not, how do you find the name of the supplier from the sender table?

 

 

@Julio35,

Yes, in the sheet "sender"  I have a related column society, the same filed in a sheet "data". But it was possible to adding a lot of column related. I select the society1 in my app and that completed the other field with address in automatic? 

If you have two tables related, then it should be easy to access the "data" table from the "sender" table.  Assuming you are working with  data from the "sender" table, you can access the "data" table in the following way:

[society].[address] or [society].[telephone] etc..

where address, telephone etc.. are columns in the "data" table. 

I hope this helps. If this doesn't answer your question, please share some images of the tables or try to explain everything with an example.

Thank you 

@Julio35 

This means that I need to add virtual columns to the "sender" table and do [society][address] so that it retrieves the information from the "data" table.

I would avoid using virtual columns for this purpose.  

Since you need to add this info in a PDF (as i guess from the post title), you can just use [society].[address] in your PDF template and this should work. 

@Julio35 

Even if it does not come from the sender table

Yes, as long as the sender table has a ref column (society in this case) that points to the data table (the one with the suppliers info). 

@Julio35 

ok I'll test tomorrow at the office and I'll tell you again

Tanks !

Perfect!

As Julio35 explained, since you have a ref column, you can just dereference it.

[ref-column].[value-column]

More detailed info in the link below
Dereference expressions - AppSheet Help

@Julio35 , 

I'm sorry but I haven't had time to test your proposal.
I'll do it within the week
have a nice day

@DVDLessa & @SkrOYC .

I'll also be testing your proposals at the end of the week.
have a nice day!

Good evening everyone and sorry I couldn't reply before. I found it and @DVDLessa  @Julio35  solution works.

Thanks ร  lot !

Top Labels in this Space