When two or more Records are related via a HasMany/BelongsTo or ManyToMany relationship Onit creates a panel displaying the relationship.
Using the Panel editor in the Advanced Designer you can customize what information these panels show.
The Panel editor has three options:
-
Summary: In a HasMany / BelongsTo or ManyToMany relationship this panel will show when only one related Record exists between the Parent and Child. This panel will show on the Parent while viewing the Child Record.
-
Multi: In a HasMany / BelongsTo or ManyToMany relationship this panel will show when multiple related Records exist between the Parent and Child. This panel will show on the Parent while viewing the Child Record.
- Related Field Name (e.g., name, task, budget detail): This option will show the Child Record information while viewing the Parent Record.
Note: The Summary and Multi panels both play different roles in displaying related Records. The Summary panel will show when only one related Record exists while the Multi panel will show when more than one Record exists. Be sure to create both types of panels unless you wish to revert to the default view when there is only one Record or multiple Records.
To start customizing your panels navigate to the Panel node in the Advanced Designer, then click the Plus button to create a new panel.
First we will create a panel that displays information about the child Record while viewing the parent Record.
In the Name dropdown select the name of the HasMany Field relating your child App.
You can optionally filter which child Records will be displayed in this panel using the Filter property. Records that do not meet the filter requirements will not show in the panel, we will skip this configuration for now.
Next, add a new Field you would like the panel to show by clicking the Plus button.
Fill out the properties as follows:
- Label: The label of the Field the user will see. Note, the label will be displayed if there is only one Record in the panel, otherwise the Fields will display stacked in columns without the label.
- Value: The name of the Field you want to display. You can use Liquid filters by entering a pipe character ( | ) and then the filter; but do not enclose your filter in curly brackets (e.g., field5 | upcase). Additionally, you cannot use if statements or other Liquid tags.
- Order: A numerical value for the display order of the Fields in the panel.
Once you have created your panel click Save. This panel would show as follows when viewing from the parent Record:
Summary and Multi Panels
Now let's create a panel that will show information about the Parent Record while viewing from the Child Record.
Create a new Panel and choose Summary. This panel will display when there is only one Record relating the Parent and Child.
Fill out all the Fields you would like displayed in the panel, then click Save. Remember this panel will display information when there is only one related Record.