Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

How to dynamically set default tab (Playbook vs Details) in config Workspace based on field value

dilip123
Tera Contributor

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:

  1. What is the best practice to achieve this dynamic tab focus in the Next Experience UI?

  2. If using the Variant approach, how can I script the UX Screen Condition to check if u_line_of_business == 'MPL'?

  3. 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.

1 ACCEPTED SOLUTION

I don't think it will be easy to accomplish this, since you are on the same workspace. Doing this based on record content will be tricky and will also create technical debt you will have to test and validate on every (store app) update. 

Option to consider: make it the first step on the playbook. "Validate details of the Case". 

Other option: have the playbook start after validation is done. You may need some sort of extra trigger for it. I don't know your process, but if they need to validate, you probably also want proof that they did? Your solution to show the playbook on the second tab will still allow them to skip the review and go to the second tab. If you have a 'info validated' option on the case when it's MPL and your playbook triggers on that option, your tab will become available once the validation is done. And it will be the first tab, which gives a common user experience (playbook is first) and the playbook is also the thing that needs to be followed then (validation is already done).


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

View solution in original post

4 REPLIES 4

Mark Manders
Giga Patron

Does the MPL option have a playbook as well and do you just need a different order of the tabs, or is it lacking a playbook? Because if it's the latter, you don't have any issue. The tab only shows when there is a playbook to follow. And if it does have a playbook: the playbook is used to guide the agent through the case. Why not start on it?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Hi, thanks for the reply! That's a fair point.

Yes, the MPL'cases do have an active playbook.

The reason we want this is just a specific business requirement. Our agents are supposed to look at the 'Details' tab first to review the case information before they jump into the playbook tasks. That's why we need the page to land on the 'Details' tab (Index 1) by default when an MPL case is opened. Do you know any simple way to achieve this dynamically?

I don't think it will be easy to accomplish this, since you are on the same workspace. Doing this based on record content will be tricky and will also create technical debt you will have to test and validate on every (store app) update. 

Option to consider: make it the first step on the playbook. "Validate details of the Case". 

Other option: have the playbook start after validation is done. You may need some sort of extra trigger for it. I don't know your process, but if they need to validate, you probably also want proof that they did? Your solution to show the playbook on the second tab will still allow them to skip the review and go to the second tab. If you have a 'info validated' option on the case when it's MPL and your playbook triggers on that option, your tab will become available once the validation is done. And it will be the first tab, which gives a common user experience (playbook is first) and the playbook is also the thing that needs to be followed then (validation is already done).


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Thanks for the great insight! You are absolutely right about the technical debt.

I am going to implement your suggested solution (like adding a validation checkbox or making it the first step) and show it to my PM as the best OOTB approach.

It makes perfect sense and is much better for the platform. Thanks again for your help.