Prepopulate parent reference based on previous interactions

Hi,

I have two tables Parent and Child. When users click on a parent element in my view, they see a list of related children. From here, they can add new children directly. However, the reference to the parent in the new child creation form is empty and users have to manually select the correct parent.

How do I get AppSheet to prepopulate the parent reference when creating a child from within a parent's view? When I was using an AppSheet database this was the default behavior, but, after switching to a Google Sheet backend, it isn't. Thanks!

Thank you!

Solved Solved
0 3 449
  • UX
1 ACCEPTED SOLUTION


@maurice123 wrote:

When I was using an AppSheet database this was the default behavior, but, after switching to a Google Sheet backend, it isn't


Huh?  This is an app function.  It wouldn't make sense that it works with the AppSheet Database and not with a Google Sheet.

Anyway, this has been a long-standing issue that dates back to pre-Google.  It requires a work-around and there are a couple of ways you can handle it.

1)  Force the user to add Children from the Parent Form and not from the Detail view.   If you have Parent calculations dependent on new children being added, this is the best way to go.  The big issue here is how to disable the Add button?  The way to do it is by creating a Slice of the Child table and setting it to Read Only.  In the Parent table create a NEW second Virtual Column based on this Slice - simply mimic the original "related children" column and swap the table for the Slice.  Then adjust your Parent Form to show the new Child Virtual Column that is read-only.  

2)  Add a custom action to the Parent Detail view to "Add Child".  In this action you can specify the LINKTOFORM() function and pre-populated any fields you wish onto the Child Form.  You can then display this action as Primary or Prominent.  You still need to apply the Slice option above to remove the normal Add button from the Inline table.

I hope this helps!

View solution in original post

3 REPLIES 3
Top Labels in this Space