New to Appsheet so forgive if this is a rooki...

New to Appsheet so forgive if this is a rookie mistake

I am trying to relate two google tabs by using REF in a sort of one to many relationship.

Seems to work except the related inline form with the related records displays just one item even though the (View) count shows the correct number of related items.

Clicking on the (View) link opens a new view with still just 1 item showing?

0 6 341
6 REPLIES 6

How have you implemented your โ€œsort of one to many relationshipโ€?

My guess would be your Imagery table (or slice) has six records, all with the same KEY column value.

+Steve Coile Hi thx for replying.

I have 2 tabs on same sheet - Imagery and Sales.

Both have the same column name with the same data type - text.

Imagery is the master and the column has only unique keys. The sales obviously is the many and so no unique keys.

I placed the REF formula in the Sales table - so the Imagery table has the related LIST - not sure if that is how to do a one to many in appsheet?

@Doug_Armand All tables must have unique keys in order to work properly, so youโ€™ll need to give each row in Sales a unique key, even if it means adding a new column to the Sales sheet/table.

Iโ€™m guessing your app is an attempt to track sales of images. The Images table records the individual images, and the Sales tables records sales and the image sold with each sale. If soโ€ฆ

Each image in Images is a distinct record, and should have a unique KEY column value.

Each sale in Sales is also a distinct record, and should also have a unique KEY column value. Each sale record in Sales should also have a Ref-type column that references the row in the Images table that describes the image sold. The value in that Ref column will be the KEY column value in the Images table for the image.

Many thx for that concise reply. I was trying to be too clever and had set both columns as the key. Leaving the master set as key and then letting appsheet use the _rownumber for the many has sorted it. Thx again -

appreciate it

@Doug_Armand, in general, donโ€™t use _RowNumber as a key. It isnโ€™t a stable way to do it. Try to find or add a column that uniquely identifies a row. You can, for example, add an Id column (of type Text) and give it the expression UNIQUEID() as its InitialValue. If you make that the key, it will be fine.

@praveen Thx for the heads up. Have now added a column that will have a unique key for the many (Sales) table. Very quick responses on this forum - much appreciated

Top Labels in this Space