Appsheet email template: to retrieve data from another table

Hi, I'm still very new in using this Appsheet and I really need your guidance. 

I have a parent table named Master and a child table named Final Report. A column "Ramp No." from the Final Report table is a Ref type to the Master, that link both table together. 

wannurhidayah1_4-1657004380076.png

 wannurhidayah1_5-1657004422603.png

In the app, I have this Final Report Form (from Final Report table), where user can choose an ID and then an email (with all the related data of the chosen ID retrieved from table Master) will be send to them. The Ramp No. here is the values of column Ramp No. in the Master table.

wannurhidayah1_3-1657004175456.png

From the email preview, it works just fine. But when I test using the app, the email sent displays nothing. In preview email:

wannurhidayah1_0-1657003776371.png

In real email:

wannurhidayah1_1-1657003853440.png

I've tried using dereference expressions that I found here but it displays nothing as attached previously. Below is what I did in the email template:

 

 

We thank you for your cooperation to facilitate the ramp inspections on your aircraft <<[Ramp No.].[Aircraft Type]>>(<<[Ramp No.].[Registration mark]>>) on <<[Ramp No.].[Timestamp]>> at <<[Ramp No.].[Place]>>

 

 

I've also referred to these but still I failed to get the output:

1) https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Getting-a-column-value-from-a-ref-Table/m-p/334...

2) using lookup() function https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/How-to-retrieve-data-from-another-table/td-p/35...

 

 

<<LOOKUP([_THISROW].[Ramp No.], "Master", "Ramp No.", "Aircraft Type")>>

 

 

Hope somebody can help me with this 🙂 Thank you.

Solved Solved
0 2 142
1 ACCEPTED SOLUTION

Best I can do is guess here.  But heres a few pointers:

  1. Check that the MASTER table has all unique key columns.  This deref might actually be looking at a totally different row than the one you are expecting it to
  2. Setup a virtual column in Final Report with <<[Ramp No.].[Master Key Column]>> to double check that its getting the keyID right.  Suggest also doing the same with the other 3 derefs
  3. One thing I noticed is that part of the string of text IS working.  "at <<[Ramp No.].[Place]>>2" is returning "at Category 1".  Investigate this as it might give you some idea why the 3 DeRefs before this are not working

Simon@1minManager.com

View solution in original post

2 REPLIES 2

Best I can do is guess here.  But heres a few pointers:

  1. Check that the MASTER table has all unique key columns.  This deref might actually be looking at a totally different row than the one you are expecting it to
  2. Setup a virtual column in Final Report with <<[Ramp No.].[Master Key Column]>> to double check that its getting the keyID right.  Suggest also doing the same with the other 3 derefs
  3. One thing I noticed is that part of the string of text IS working.  "at <<[Ramp No.].[Place]>>2" is returning "at Category 1".  Investigate this as it might give you some idea why the 3 DeRefs before this are not working

Simon@1minManager.com

Sir, thank you so much!!! I have tried your step 2 and turns out Appsheet is using the Ramp No. from table Final Report instead of table Master. So I changed the column name to differentiate between the two. I also changed the table name in the Process from table Master to table Final Report and now it works perfectly! Thank you again!

wannurhidayah1_1-1657068870394.pngwannurhidayah1_0-1657068731286.png

 

Top Labels in this Space