Scenario Overview
In this scenario we will demonstrate how to set up a ClientSide Decision Table that you can to make multiple updates and changes to a form depending on various conditions.
For this article it is assumed that you have at least basic familiarity with Decision Tables and/or have read the following articles:
Note: We will not detail step-by-step instructions here on how to set up Conditions or Actions, please read the above articles if you need detailed configuration steps.
For this sample we will use Origin optionset on the Case entity.
We have added the following to the Case form:
- A Tab Called Social Media
- A Section in this Tab called Facebook
- A Section called Twitter
- 4 Fields, 2 in Facebook Section and 2 and in the Twitter Section
The Business Rules
When the Origin Optionset is set to Twitter
- Expand the Social Media Tab
- Hide the Facebook Section
- Make the Twitter name field mandatory
When the Origin Optionset is set to Facebook
- Expand the Social Media Tab
- Hide the Twitter Section
- Make the Facebook User Profile field required
When the Origin Optionset is set to anything else
- Close the Social Media Tab
- Hide the Facebook Section and the Twitter Section
North52 Decision Suite Solution
The North52 Decision Suite solution works like this:
- A Decision Table of type 'ClientSide - Perform Action' is created on the Case entity
- The Source Property is set to 'Origin' and the 'OnLoad' event
- The Event is set to 'Create & Update'
- Exit on First Match is turned On (checked)
The Decision Table
Note: By naming the Action columns as ClientSide the Decision Table understands that we want to execute a ClientSide formula here against the form rather than against a specific field. You can set the column name by right-clicking within the column to bring out the contextual menu, then select Set Action Column Options > Set ClientSide Action - see an example here.
In the above example, when the Origin is set to Facebook the Decision Table will do the following:
- Expand the Tab: Social Media
- Show the Section: Facebook
- Hide the Section Twitter
- Set the Facebook User Profile as a Required Field
- Set the Twitter Field as Not Required
Below you can see the the Decision Table in action. When the Origin is set to Facebook
When the Origin is set to Twitter
When the Origin is set to another Option