Difference between revisions of "Subforms"
imported>Aeric |
imported>Aeric |
||
Line 23: | Line 23: | ||
#::* It defaults to 5 rows. You can specify any value up to 100 rows. | #::* It defaults to 5 rows. You can specify any value up to 100 rows. | ||
#::* If data exists, then all available data is shown, plus an additional 3 empty rows. | #::* If data exists, then all available data is shown, plus an additional 3 empty rows. | ||
#Use the [[Arrow Button]]s to move fields to the list of Selected Fields list, to specify their order.<br>The selected fields are displayed in the Subform when the form is displayed. | #Use the [[Arrow Button]]s to move fields to the list of Selected Fields list, to specify their order.<br>The selected fields are displayed in the Subform when the form is displayed. | ||
#Click '''[Next]''' | #Click '''[Next]''' |
Revision as of 23:28, 26 June 2013
In a Web Form, a subform can be used display related records (records that have a Lookup to the current record). It can also allow related records to be created by filling in the subform fields.
For example, a subform might present this kind of information in a record:
- Line items in an order
- Expense line items in an Expense Report object
- List of available inventory items
- Considerations
-
- The owner of the main record becomes the owner of the related records created by the subform.
To Add or Edit a Subform
- Choose one of the following options:
- Click the New Subform link (located in the Elements Sidebar)
- Or click the Edit link in a subform section heading.
- Fill in the subform settings:
- Title
- The text to display in the GUI.
- Section Type
- Pre-populated (do not change)
- Object Name
- The Object records to display in the Subform
- Linking Field
- Select the field that does a Lookup to the current object. (A list is presented, in case there is more than one.)
- Number of Rows
- Specify the number of rows to display in the Subform
- This is the minimum number of number of rows to display.
- It defaults to 5 rows. You can specify any value up to 100 rows.
- If data exists, then all available data is shown, plus an additional 3 empty rows.
- Use the Arrow Buttons to move fields to the list of Selected Fields list, to specify their order.
The selected fields are displayed in the Subform when the form is displayed. - Click [Next]
Sorting Rows, Totaling Columns
The second page of the subform definition lets you specify sorting and totaling options:
- Sort Settings
- Choose the column to sort on, and specify ascending or descending sort.
- Column Totals
- Select the numeric and currency fields that will be automatically totaled.
(Only numeric and currency fields are listed.) - Column-Total Adjustments
- This section appears when you are totaling currency fields. (Only currency fields are listed.)
- Select the currency field that will have additional adjustments applied to it, and specify the adjustments to allow for. (See below)
- Click [Save]
Column-Total Adjustments
If you total one more currency fields, you can elect to apply adjustments to one of them:
- Surcharge - Adds a surcharge percentage field to the form.
- Discount - Adds a discount percentage field to the form, as well as a discount amount.
(Either can entered. If an amount is entered, it is saved as a percentage.) - Tax - Adds a tax percentage field to the form.
- Shipping - Adds a field for a shipping charge.
Each selection adds the appropriate fields to the form, and does the appropriate calculations to produce a net total:
Note for Developers:
Fields for Column Totals, Column-Total Adjustments, and the Net Total are added to the original object (the object the subform is defined on). The field names have the form grid_{name}_123456..., where the name might be "discount", "net_total", or "comptn" (for a column total), and where the number at the end is the ID of the object Field.