How to dynamically set default tab (Playbook vs Details) in config Workspace based on field value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi Community,
I am working on the CSM/FSM Configurable Workspace and I have a requirement to dynamically change the default tab that opens when a user views a Record.
Requirement:
Table: Claim Case (sn_ins_claim_cml_spc_claim_case)
If the field Line of Business (u_line_of_business) is 'MPL', the page should default to the 'Details' tab (Index 1).
For all other values or if it's empty, it should default to the 'Playbook' tab (Index 0).
What I have tried so far:
Approach 1: Transform Data Broker (Scripted) I created a custom Transform Data Broker to evaluate data.glide_form_1.nowRecordFormBlob and return the tab index (0 or 1). I bound this output to the Selected Tab Index property of the Tabs component. Issue: It is not working consistently on page load/refresh. It either defaults to the wrong tab or ignores the data broker output.
Approach 2: Creating a New Record Page Variant I created a duplicate variant of the Record page to set the 'Details' tab as default. However, when I try to set the conditions for this variant in UI Builder (Settings -> Conditions), the condition builder only allows me to select URL parameters (like table or sysId). It does not show the actual record fields (like Line of Business).
I also checked the UX Screen Conditions, but I am unsure how to write the scripted condition to fetch the backend field value during the page load to route to this specific variant.
My Questions:
What is the best practice to achieve this dynamic tab focus in the Next Experience UI?
If using the Variant approach, how can I script the UX Screen Condition to check if u_line_of_business == 'MPL'?
If using the Data Broker approach, what is the exact binding required for the Selected Tab Index to make it work seamlessly on page load?
Any guidance or examples would be highly appreciated!
Thanks in advance.