How to Display Current RITM Approvers in a Custom SOW Tab Using UI Builder?

BattuLakshmi
Tera Contributor

Hi ,

 

I created a custom Approvers tab in Service Operations Workspace using the SOW - Record tabs middle page collection. I added a Record List using the Approval (sysapproval_approver) table. The current RITM context is available through the inherited SOW Record Controller (sysId and table).

How can I dynamically filter the Record List so that it displays only the approvers related to the currently opened RITM, without hardcoding the RITM sys_id?

The existing Related Records → Approvers list is displaying the correct approvals, but I need to display the same approval records in my new custom Approvers tab.

 

Thanks.

1 REPLY 1

kmohammed
Giga Guru

Hi,

 

Yes — do not type a value into the Record List filter. Bind the filter value to the page context instead. That is exactly how the OOTB Related Records Approvers list gets the current record: it filters sysapproval_approver on the record the page was opened for.

 

Approach:

 

1. Keep the Record List table as sysapproval_approver.

 

2. In the Record List configuration, build the filter on the approval's record field — Approving for / sysapproval — with operator "is", and for the value use the data-binding (dynamic) option rather than a typed value. In the binding picker, take the sysId exposed by the inherited SOW Record Controller / page properties (the same sysId and table context you mentioned). The resulting filter is effectively:

   sysapproval = {{ current record sysId from page context }}

   so it is evaluated per record opened, with no hard-coded sys_id anywhere.

 

3. Add any secondary conditions you need as static conditions on top of that — for example approval state, or ordering by Created — those do not need binding.

 

If your Record List instance does not expose a bindable value field for the filter in your version, use the alternative pattern that achieves the same thing:

- Add a Look Up Records data resource on sysapproval_approver with the condition sysapproval = the page-context sysId (data resource conditions do accept the controller/page binding).

- Point the Record List at that data resource instead of letting it query the table directly.

 

Testing tip: in UI Builder, set the page's test/default sysId and table to a real RITM that has approvals, in preview. If the list then shows that RITM's approvals, open a different RITM in SOW without touching the page — the list must change with it. If it shows all approvals, the value was saved as a static string rather than a binding, which is the usual cause of this problem.

 

One check: this will return the same set as Related Records -> Approvers, because both are driven by the sysapproval relationship to the opened record. Approvals raised against the parent Request rather than the RITM itself will not appear in either list.