Set the Window Size of a Subview or Subform
You can set the height and width properties of a subform using the Open a subform rule action. In the same respect, you can set the height and width properties of a subview using the Open a subview rule action. Both actions are available when configuring form rules (they are not applicable at the view rule level).
Example: When you double-click a row on the parent form, the subform opens. In the image below, the subform's title, height, and width are set by configuring the Open a subform rule action.
Try it yourself!
You can find the Open a Subform action in the Subform Interaction group and the Open a Subview action in the Subview Interaction group.
Rule Breakdown
In this example, you have a form (Customer List Form) that shows a list of customers (Customer List view). You want to open the customer's details and order history as a subform after double-clicking a row. You add an action to the list-item double-click rule that opens the Customer Details and History Form, then configure the height and width of the subform.
- Events define when the rule should run, such as when a button is clicked, or when the form loads. (Events are optional, you can define "event-less" rules that you can call from other rules.)
- Conditions define whether the rule should run. If the criteria are true, continue the rule, and if the criteria are not met, stop the rule. For example, a condition might evaluate a form to confirm that required fields have content. (Conditions are optional - not all rules will require conditions.)
- Actions define what the rule should do. For example, show a message, start a workflow, or enable a form field. Rules can contain multiple actions that are run in sequence or in parallel.
Form
Follow the steps below to configure the Open a subform action.
- Edit the Customer List Form and open the Rules screen.
- Edit the Customer List (view) > When Customer List executed List item double click rule.
- With the Actions tab active, click Open a subform to add it to the rule definition pane. Click select Form, then navigate to and select Customer Details and History Form. Click (configure).
- To set the width of the subform, enter a value into the Width text box. To set the height of the subform, enter a value into the Height text box. Click Finish to save the action configuration. Click OK to save the rule. Click Finish to save and exit the form.The default dimensions of a subform are 80% height and 80% width of the parent form. Use whole numbers or pixel values between 70 and 32767 or percentages that do not exceed 100%. You can manually enter subform settings or use values from the Context Browser.
There are two sections to the Open a subform configuration screen: Subform Settings and Input Mappings. In the Subform Settings section, you can set the form's Title, Width, and Height properties. You can also use values from the Context Browser to dynamically set the properties at runtime.
- Whole numbers are treated as pixel numbers. For example, 300 is the same as 300px.
- When adding height or width in percentages, use the percent sign (%) to distinguish the entry from a pixel number.
- If you specify invalid values or use rules to clear values, the settings revert back to 80% by 80%.