Issue with Parent Child Relation in tables

Hi,

I have a Parent table which I have linked to multiple child tables and the issue I am facing is for some child tables even though the key of parent table is added and column type is selected as Ref with source table as Parent table still workflow in forms the child table does not appear,which was working fine few days back

We havenโ€™t changed anything in backend,although not sure what is causing such issues to appear is it because our app is in pre deployment stage and also if anyone can help us understand the cause.

Solved Solved
0 6 335
1 ACCEPTED SOLUTION

When you create a Ref column, whether itโ€™s a โ€œstandardโ€ Ref column or used with the โ€œIs a part ofโ€ setting, AppSheet will ALWAYS automatically generate a REF_ROWS column list in the table being referenced. REF_ROWS is the function used to generate the list of rows from the related table. That column name will start with the word โ€œRelatedโ€ + โ€œname of column referencingโ€ and then a letter โ€œsโ€ is tacked on at the end.

This explains the last column listed in your column list - โ€œRelated Customised Combo Roman Blindsโ€.

The other two columns MUST have been created manually. This could be either by renaming the automatically generated column or just straight out creating the column.

For example, after setting up the REF column, AppSheet would have automatically created the column named โ€œRelated Customised Combo Roman Blindsโ€. If you changed that name to simply โ€œCustomised Combo Roman Blindsโ€, then on the next table generation, AppSheet will automatically re-create the โ€œRelated Customised Combo Roman Blindsโ€ column and you will have both columns present in that referenced table.

The question isโ€ฆ Do all three of these columns generate the same list of REF rows? If they do then DELETE the first two Virtual columns from that Parent table and leave the โ€œRelatedโ€ column - the one that is automatically generated. Use that column in your views

If it is the case the that โ€œRelatedโ€ column doesnโ€™t provide the list of REF rows you need then by all means add your own custom column of REF rows. Youโ€™ll need to decide which of those other two coumns is the one you wish to keep and delete one not needed. This does mean that both, your manual column and the automatic โ€œRelatedโ€ column, will need to be left in the table. If you have no need at all for the โ€œRelatedโ€ column, then hide it by turning off Show? property.

View solution in original post

6 REPLIES 6

Itโ€™s not because the app is undeployed. But something has changed.

Can you start by showing an image of the view where the issue occurs and then ALSO an image of the definition of that view and the columns it has been configured to show?

Hi,

I am attaching the screenshots of the view of the form of parent table,where in I am getting 3 options of a single child,which refer to same child (In red I have marked the options that are referring to same table). I am not sure why am I getting 3 options of the same,also attaching screenshot of the child table where in I have defined the relations.

When you create a Ref column, whether itโ€™s a โ€œstandardโ€ Ref column or used with the โ€œIs a part ofโ€ setting, AppSheet will ALWAYS automatically generate a REF_ROWS column list in the table being referenced. REF_ROWS is the function used to generate the list of rows from the related table. That column name will start with the word โ€œRelatedโ€ + โ€œname of column referencingโ€ and then a letter โ€œsโ€ is tacked on at the end.

This explains the last column listed in your column list - โ€œRelated Customised Combo Roman Blindsโ€.

The other two columns MUST have been created manually. This could be either by renaming the automatically generated column or just straight out creating the column.

For example, after setting up the REF column, AppSheet would have automatically created the column named โ€œRelated Customised Combo Roman Blindsโ€. If you changed that name to simply โ€œCustomised Combo Roman Blindsโ€, then on the next table generation, AppSheet will automatically re-create the โ€œRelated Customised Combo Roman Blindsโ€ column and you will have both columns present in that referenced table.

The question isโ€ฆ Do all three of these columns generate the same list of REF rows? If they do then DELETE the first two Virtual columns from that Parent table and leave the โ€œRelatedโ€ column - the one that is automatically generated. Use that column in your views

If it is the case the that โ€œRelatedโ€ column doesnโ€™t provide the list of REF rows you need then by all means add your own custom column of REF rows. Youโ€™ll need to decide which of those other two coumns is the one you wish to keep and delete one not needed. This does mean that both, your manual column and the automatic โ€œRelatedโ€ column, will need to be left in the table. If you have no need at all for the โ€œRelatedโ€ column, then hide it by turning off Show? property.

Hi,

Thanks a lot for the explanation but because of this issue does the mapping also goes wrong in the parent form when we want to add the child table?

Itโ€™s possible depending on how the other Virtual Columns are implemented AND what your view is actually configured to show. That is why I asked โ€ฆ

Then we can analyze step by step where the issue is in your implementation.

I wanted see the problem view and then make sure we are looking at that exact view for the columns expected to be shown. Then from that we can look at the columns to try to determine why they are not being shown.

Hi Thanks a lot for the assistance but the issue have seemed to resolve now.

Top Labels in this Space