Select Form
| Rules and examples |
|---|
|
The Select Form rules are triggered when a form is about to be displayed. They let you set up which form is used for a particular record. For example, the form when creating a new record can display only a subset of fields. Once the record is saved, the full form is displayed instead.
Select Form rules are managed in Woodford, on the list of Mobile Views, Forms and Charts of an entity.
Unlike most rules, Select Form rules are listed directly on the Mobile Views, Forms and Charts screen. To delete a Select Form rule, select FormSelectRule and click Delete.
| Note | Due to architectural constraints, Select Form rules are not supported for Sales detail entities (such as OpportunityLineItem, OrderItem, QuoteLineItem, DealItem). This applies to all platforms (Salesforce, Dynamics, Resco Cloud). As a workaround, you can use multiple form tabs and show/hide them using On Load rules. In older versions of Woodford, it used to be possible to configure Select Form rules for these entities, but the rules did not work. |
Example of a simple select form rule
| If Condition | Entity.statecode | Equals | Active |
| Then Step | FormName | Assign | MyActiveForm |
| Else Then Step | FormName | Assign | MyInactiveForm |
Example: Select a different form for customer and partner account
In this example, we prepare two forms—one for "Customer" accounts and the second for "Partner" accounts.
First, we can prepare a specific form for each account type.
-
Partner
-
Customer
Finally, set up the Select Form rule. If the Account level contains data, start the value-checking branch. If the relationship type equals Customer, assign the Customer form. If the relationship type is partner, assign the Partner form.
<?xml version="1.0"?>
<Workflow e="true" isvalid="true" syntaxVersion="11" version="0">
<branch e="true" info="">
<if e="true">
<conditions e="true" op="And">
<condition e="false">
<var>Entity.customertypecode</var>
<op>ContainsData</op>
</condition>
</conditions>
<action>
<branch e="true" info="">
<if e="true">
<conditions e="true" op="And">
<condition e="false">
<var>Entity.customertypecode</var>
<op>Equal</op>
<arg>Picklist:3</arg>
</condition>
</conditions>
<action>
<function e="false">
<var>FormName</var>
<func>Assign</func>
<arg>String:Customer</arg>
</function>
</action>
</if>
<if e="true">
<conditions e="true" op="And">
<condition e="false">
<var>Entity.customertypecode</var>
<op>Equal</op>
<arg>Picklist:5</arg>
</condition>
</conditions>
<action>
<function e="false">
<var>FormName</var>
<func>Assign</func>
<arg>String:Partner</arg>
</function>
</action>
</if>
</branch>
</action>
</if>
</branch>
</Workflow>
Error: no form displayed
If your select form rule is malformed and no form is specified, the app does not display any form. Instead, the app displays an error message that the configured 'FormSelectRule' does not set any FormName.
See also
