I have two tables currently. Table 1 has the main customer information in it and Table 2 is logging all changes that are made to a particular customer record.
When the user clicks on a Customer record in the App View I want to show the full list of changes that have occured for that account (Table 2) in the Customer View along with all the existing customer ino (Table 1). Having trouble figuring out how to do this. It should be using the Customer Record number as the key to pull the info from Table 2
Table 1:
Table 2
View
Solved! Go to Solution.
Assuming:
and:
I gave it a try, and...AppSheet Database offers difficulties, compared to when using Google Sheets.
Can you try instead, to create a virtual column:
FILTER("task",[customer_record]=[_THISROW].[customer_record])
It works for me:
In your app editor, on the Table 2 "Changes", please set the type Ref (which stands for "Referencing to") for your column name "Customer number", and set the source table to your table 1 "Customer".
Please note:
In your table 1 Customer, you MUST set your column "customer number" as being the key of your table, otherwise that won't work.
For reference:
Add references between tables - AppSheet Help
References between tables - AppSheet Help
I followed the article but it doesnt seem to be working for me:
Table 1 (Formula that is populated: REF_ROWS("Table 2", "Customer Record"))
Table 2
The Table 2 should have [Row ID] as the Key, not [Customer Record].
The [Related] column you created will be generated automatically. You don't need to create it manually. I invite you to delete it.
I made that change and it is still not showing the data from Table 2 in the view. Even in the Database view it doesn't show anything in that column and it doesnt allow me to set the reference column as a label.
View
Table 1
Table 2
DB View of Table 2
DB View of Table 1
Assuming:
and:
I gave it a try, and...AppSheet Database offers difficulties, compared to when using Google Sheets.
Can you try instead, to create a virtual column:
FILTER("task",[customer_record]=[_THISROW].[customer_record])
It works for me:
What you provided works with the virtual column: FILTER("Table_1",[Customer Record]=[_THISROW].[Customer Record])
It does appear though to only pull one row back in the View and for waht ever reason is showing data on the wrong accounts. Any ideas what I did wrong? (using the same data in the images and only data for the one customer should be showing up)
It should show 4 different rows for this account but only shows one:
It looks to be picking random rows for the other accounts that do not have the same customer number:
User | Count |
---|---|
17 | |
14 | |
10 | |
7 | |
4 |