How can I get column value of 2nd table to 1st table field

I am new to Google AppSheet and trying to build an app for organisation local use.

I have two tables, 1st table stores details of Request form and 2nd table stores Cluster Names, Cluster Codes and Cluster Count.  Once the Request form is filled and saved, a action gets triggered, which increments Cluster Count in 2nd table based on the Cluster Name selection in Request form.  I want the value of Cluster Code and Cluster Count from 2nd table to update fields in 1st table.

Appreciate the help and I spent time in trying different options.

Solved Solved
0 2 57
1 ACCEPTED SOLUTION

If I understand your requirements correctly, what you have is typically accomplished as follows.

Set Cluster Codes the key and Cluster name the label. If you make the Cluster column in the 1st table a ref to the second, then the user can select a cluster by its name and code is actually stored in the field. You want to minimize the amount of data to be saved and this should work for most use cases.

As for the Cluster count, if you want to store the count after a newly created row is counted in, then you create an action to update the field with [cluster code].[cluster count] (this assumes that [cluster code] to be a ref to the second table as described above) and trigger it after the table 2 update action you already have using a Composite action.

TeeSee1_0-1671535833064.png

If your App is a multi user app, then the count may not be exactly what you want - could be duplicated - if rows are created at the same time....

View solution in original post

2 REPLIES 2

If I understand your requirements correctly, what you have is typically accomplished as follows.

Set Cluster Codes the key and Cluster name the label. If you make the Cluster column in the 1st table a ref to the second, then the user can select a cluster by its name and code is actually stored in the field. You want to minimize the amount of data to be saved and this should work for most use cases.

As for the Cluster count, if you want to store the count after a newly created row is counted in, then you create an action to update the field with [cluster code].[cluster count] (this assumes that [cluster code] to be a ref to the second table as described above) and trigger it after the table 2 update action you already have using a Composite action.

TeeSee1_0-1671535833064.png

If your App is a multi user app, then the count may not be exactly what you want - could be duplicated - if rows are created at the same time....

@TeeSee1 

Thanks a lot.  It worked.

Top Labels in this Space