A Parent-Child Relationship on a Form

0
I am creating a Form for a small recipes database.  The form had two tabs; General and Ingrediants.  The form had a tab control that has a General Tab and an Ingrediants Tab.  The form also has the standard Save and Cancel buttons.   Would I need to create a Set for the Ingrediants that retrieves these from the related Ingrediants table?  I am not quite sure how to do this.  I've looked for an example Form or Microflow, but can't seam to find one.   My thoughts were that when the form opens the Recipes table would pull the specific recipe into the Recipe Tab fields, and for the Ingrediants I thought that the Recipes microflow would have to call an Ingrediants microflow to show the list of ingrediants.  Does this sound like I am on the right track?
asked
1 answers
0

Let first take a look at the domain model. A recipe has multiple ingredients and those ingredients can be in multiple recipes. So this means a many to many relation between those entities. Now for creating the forms. From the recipes overview you can the modeler create a new / edit form to enter new recipes. This will create a dataview form of the entity recipe. But as you can see you do not have the ingredients yet on this form. Now choose the reference set selector and place that on the form. The modeler will ask you if it should use the reference recipe - ingredient. Now you can add ingredients to a recipe but you stil can not add new ingredients. You could handle that from an ingredient overview form or use a custom create button with a microflow to create the new ingredient object set the reference to the recipe and show the new / edit form of this new ingredient. 

Hope this helps a bit. If not edit your original question on where you get stuck and we will try to help you further.

Regards,

Ronald

 

answered