Error notification/icon on read-only tab

The customer is developing the mortgage application in Infinity 25, Constellation. The requirement is to display a visual notification to the advisor processing the mortgage case that some of the KYC/credit remarks require the advisor`s attention (read-only). These remarks are placed under one of the case tab (see attached screenshot).

Does Pega provides any solution to address this requirement?

@bebem I’m not sure the following is the best UX, but here is an option:

Constellation supports emojis. So you could in theory have 2 different versions of the summary panel tabs and subtabs that you conditionally display based on whether there are any warnings or not:

2 Likes

The error handling for Validation rules are all based on the User Action (assignment) - its designed to help complete that User Action, not display a read only list of errors on the case tabs.

I am wondering out aloud, what about the Infinity ā€˜25 feature for Field warnings and contextual messages in forms. It says forms (user action / assignment) but its configured on the View - I wonder what happens if configure it on a Form View then reuse that in a Case Tab? It might show (it might not).

I would assume it does not show, Constellation being context aware by not putting field INPUT warnings in a read only context. And indeed - it does not show:

1 Like

I have already tried this one but I wasn`t sure whether this is ā€œan elegantā€ solution for this. Do you think I can propose it to the customer? Are there any hidden negative consequences of using it or so?

I think the main thing you need to consider if it’s a pattern you feel comfortable with in your application. Because it will inevitably end up being used for other places as well. If indeed it is something you can see yourself using also in the rest of the app - go ahead. If it’s more of a workaround for 1 scenario, I would be more cautious.

There is also a bit of maintenance to consider if this pattern becomes heavily used. The more sub-views you have with visibilities, the more cluttered your views will become.

2 Likes

@bebem like @LantzAndreas has said, maintenance is the biggest concern. This anti-pattern is not scalable - you could easily see this result in issues like:

  1. When filling out the fields in a user action / form, the error messages shown on submit differ from the tab
  2. Fields added to the form, are not shown on the case tabs
  3. The case tab with errors look different to the case tabs without (e.g. missing tabs, or fields, or different order).

Keeping this in synch between your 2 tabs and your user actions / forms, is more effort.

Honestly, I’d want to look at a custom DX component for this. Something that is a single view that can check the errors and display as needed… Even then, a solution to match your UI would not be simple.

Errors Section/Tab
Now I’m thinking out aloud, those fields are populated in a user action / form? Maybe on submission of the form we could record the errors and list it in its own ā€œerrorsā€ tab. That would be far more maintainable. Forgive the crude mockup:

1 Like

Hello @bebem

If showing tab labels is an important functionality in your application you can have a look at the below approach as well.

I have an approach in mind which you can use as an extension to what @MarcCheong has mentioned.

Declarative Processing for Dynamic Tab Labels

You can implement a more flexible and reusable solution using declarative processing.


1. Create a Dynamic Label Property

  • Create a property: DynamicLabel
  • Use this property as the tab label (Dynamic Text)

2. Configure a Declare Expression

  • Create a Declare Expression for DynamicLabel
  • This will control the label value dynamically based on conditions

3. Create a Utility Function

Create a function: GetDynamicLabel

Parameters:

  • tools – PublicAPI
  • myStepPage – ClipboardPage
  • Anchor – String (e.g., ā€œSuccessā€, ā€œErrorā€)

4. Use a Decision Table for Label Mapping

Inside the function:

  • Pass Anchor as a parameter to a Decision Table
  • Maintain mappings like:
Param.Anchor Return Value
Success Success :green_circle:
Error Error :red_circle:
Else Default Label
  • Return the result from the decision table back to the function

5. Call Function in Declare Expression

Use conditions to set the value dynamically:

  • If ShowSuccess

    @GetDynamicLabel(tools, Primary, "Success")
    
  • Default

    • Return a generic label of your choice

Important Note

  • This approach is not feasible if you directly use this property on work case and use it for multiple tabs as the property would not know from which tab context it is originated and which conditions it has to call.
  • But combining the above approach with a Data page list that contains multiple entries and shown as embedded tabs, you can have this property for each page and based on the context of the page it can derive what label has to be rendered.

I will try this combined approach and keep the updates coming here..

Thoughts, feelings, suggestions are appreciated.

Regards

JC

1 Like

Wow @JayachandraSiddipeta, this is interesting! Never thought of this and I didn’t know tab labels could be dynamic.

It’s not clear when you do it:

Only after tab creation can you make it dynamic

Simplified solution?

Dynamic text rules allow you to reference a property, so I’m wondering if you’d need to go to the trouble of functions etc. We could just make the dynamic rule show what we want by adding when rules to it (you have to use Dev Studio for this)

Point is there are options, and you could get this working AND its more maintainable than have two sets of tabs (one for error and one for not). Nice work :slight_smile:

1 Like