Good afternoon,
Is there a way to add a child record to a parent record while you’re still in the form view of the parent?
So, I have a parent table called Orders, and a child table called Order Items. I want to have the option to add items to an order, before saving the order. Like within the form to create a new order, there should be an option to add items, instead of having to save the order, then going back and adding the items.
Is this doable?
I have an action linktoform, to easily add items to an order, but this won’t show up on the form view.
Yes, if you set the "IsPartof " setting to Yes in the reference column in the child table.
Please take a look at the section “Express ownership between tables” in the help article below.
References between tables - AppSheet Help
Please take a look at the following excerpt from the article. No. 1 point is what you are looking for. No 2 and No 3 are other impacts of this relationship that you need to be aware of.
Also please take a look at the following sample app. There one can add the Order details while still being in the Orders table form.
Order Capture How-to - AppSheet
2 Likes
You are welcome. One aspect you please be aware of : in this “IsPArtOf” relationship, when a parent record is deleted the related children records are also deleted. That is why the name “IsPartOf”
1 Like
That’s great! I used to have to replace the default delete action (on the parent table) from delete this row to execute a set of actions, which also deletes the child records. I can’t believe I never knew of this.
2 Likes