Difference between revisions of "Layout Rules"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric |
||
Line 40: | Line 40: | ||
#Click the '''[Layout Rule]''' button at the top of the page. | #Click the '''[Layout Rule]''' button at the top of the page. | ||
#Click the '''[Add New Rule]''' button to add a new Layout Rule,<br>or click the name of an existing rule to edit it. | #Click the '''[Add New Rule]''' button to add a new Layout Rule,<br>or click the name of an existing rule to edit it. | ||
# | #Fill in the layout rule settings. | ||
#Click '''[Save]''' | #Click '''[Save]''' | ||
====Layout Rule Settings==== | |||
;Name:Name of the Layout Rule | |||
;Enabled:Check the box to enable the Layout Rule, or uncheck it to disable the Layout Rule | |||
;Description:Description of the rule | |||
;Apply rule during:Executes the Layout Rule when any of the selected actions are taken on a record in the [[Object]] | |||
:*Add Record | |||
:*View Record | |||
:*Update Record | |||
;On Success do not continue to next Rule:Checkbox, unchecked by default | |||
:*If checked, and this rule is Triggered, then any rules that follow are not processed | |||
:*The order of processing rules is controlled with the [Reorder Rule] button. | |||
;If (specify the condition...)''': Use the [[Formula Builder]] to define a Boolean expression that evaluates to true or false. | |||
:* Optionally, specify an action to take when the expression is true | |||
:* Optionally, specify an action to take when the expression is false. | |||
:Actions are displayed in rows which can be added, edited, deleted or reordered. | |||
:Available actions: | |||
::*Show/Hide Sections or Fields | |||
::*Disable/Enable Fields | |||
::*Assign Value to Field<br>(Choose a field. Use the [[Formula Builder]] to create a value expression.) | |||
::*Setup Value in Picklist | |||
::*Display Message: | |||
::::* Once During Form Save Only | |||
::::* When Condition Matches | |||
:::*Show/Hide Buttons | |||
:::* Make Fields Required | |||
::* Make Fields Not Required | |||
====Reorder Layout Rules==== | ====Reorder Layout Rules==== |
Revision as of 02:33, 13 May 2014
Layout Rules provide the ability to create dynamic Forms that adapt and offer additional options as data is entered.
About Layout Rules
As data is entered into a form, Layout Rules can be used to:
- Hide or show fields or entire sections of a form.
- Disable or enable fields
- Assign a value to a field
- Hide or show values in a Picklist
- Hide or show values a Button
- Display a message
Sample use cases:
- Show a discount button when an amount reaches some value
- Hide a section to prevent access to data until after a specific date and time.
Working with Layout Rules
Users that have the Customize Objects permission can edit Layout Rules.
Layout Rules use an IF...THEN...ELSE model to customize a form layout:
- IF <some condition> is TRUE
- THEN do <something>
- ELSE do <some other thing>
- To specify a <condition> you use the Formula Builder to create a [Formula Expression]. That expression use record fields and fields in related fields.
- Considerations
-
- Each Layout Rule can include multiple actions
- Actions are executed in the order in which they are displayed
- Actions can be added, edited, deleted or reordered
- Sections can be opened based on a condition
- A condition can be applied on Add, View or Update of a Record
- To be available for use in a Layout Rule, the field must not be hidden in the layout.
(If it should be hidden at times, then hide it using a Layout Rule.) - Multi Object Lookup fields cannot be used to specify criteria for a Layout Rule.
Learn more: Multi Object Lookup#Considerations
Note:
A field can be referenced in either:- a. A section for which Show Empty Fields in View has been disabled
(using Advanced Options in a Section), or - b. A Layout Rule condition.
But it cannot be referenced in both places.
The Reason: If the field is empty, the server removes it from the page. The Layout Rule, meanwhile, is a JavaScript function in the page. When the Layout Rule tries to test that field, an error occurs.
- a. A section for which Show Empty Fields in View has been disabled
Adding or Editing a Layout Rule
- Click the [Layout Rule] button at the top of the page.
- Click the [Add New Rule] button to add a new Layout Rule,
or click the name of an existing rule to edit it. - Fill in the layout rule settings.
- Click [Save]
Layout Rule Settings
- Name
- Name of the Layout Rule
- Enabled
- Check the box to enable the Layout Rule, or uncheck it to disable the Layout Rule
- Description
- Description of the rule
- Apply rule during
- Executes the Layout Rule when any of the selected actions are taken on a record in the Object
- Add Record
- View Record
- Update Record
- On Success do not continue to next Rule
- Checkbox, unchecked by default
- If checked, and this rule is Triggered, then any rules that follow are not processed
- The order of processing rules is controlled with the [Reorder Rule] button.
- If (specify the condition...): Use the Formula Builder to define a Boolean expression that evaluates to true or false.
-
- Optionally, specify an action to take when the expression is true
- Optionally, specify an action to take when the expression is false.
- Actions are displayed in rows which can be added, edited, deleted or reordered.
- Available actions:
- Show/Hide Sections or Fields
- Disable/Enable Fields
- Assign Value to Field
(Choose a field. Use the Formula Builder to create a value expression.) - Setup Value in Picklist
- Display Message:
- Once During Form Save Only
- When Condition Matches
- Show/Hide Buttons
- Make Fields Required
- Make Fields Not Required
Reorder Layout Rules
- Click the [Layout Rule] button at the top of the page.
- Click the [Reorder Rule] button to change the order in which rules are executed.
Using Enumerated Picklists in Layout Rules
Layout Rule criteria can be specified using Enumerated Picklist Values. The Display Label is not considered valid for criteria in Layout Rules.