Workspace / UI Builder - Add Action, Modal & Related Lists

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 08:27 AM
Hi Folks
We are having a tough time right now trying to deliver a very common design pattern. A great example of the design pattern is the new Risk Workspace which we believe is built using the Now Experience / UI Builder combination rather than the original Workspace stack.
In this exemplar, we have:
- A parent object, in this case a Test template
- The details of the Parent record are displayed as a /record Page with the familiar Related Lists as Tabs
- We have a Content References related list which lists the related items
- We want to use the Add and Remove related list action buttons to manage the related items.
When clicking the Add button, the following modal is presented:
We're struggling to work out what is driving this Add modal and how to configure it.
Some working examples show that it is implemented as a UXF Client Action, others show it as Implemented as a bespoke UI Component (e.g. BCM). There doesn't seem to be a generic Now Experience component that we could use and simply configure for our own data relationships.
So, I have a few questions on this topic:
1) Can someone from the Product team(s) advise on how list-based modals should be implemented (e.g. bespoke component, UXF action, other)?
2) Is there any documentation that could be shared on "How to" build these commonly occurring interfaces?
3) Is there any plan to provide the Development community with a generic, re-usable interface, ideally one that can be configured with UI Builder? We're trying to avoid creating bespoke components only to find that a better/standard one is coming down the core product delivery pipeline.
4) At this risk of sounding greedy, could such a generic, re-usable component include a Search/Filter bar to avoid the need for users to page through potentially many pages to find and select the related record that they wish to Add.
Apologies for the long read - any help would be very much appreciated.
Thanks in advance
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 07:15 AM
Hi David, any idea how to apply a default filter to the mra model that pops up?
I can't see it on the properties of the mra UX Macroponent Definition, so I'm guessing not.
Wondering if my best bet is to figure out a before query business rule for my use case.
This is related to the "Add" button on Disposal Orders (HAM) which pops up a modal to add a list of assets to be disposed. This has no filter on the assets on the HAM workspace, whereas the legacy view only shows assets planned for disposal.
I ran through all the records trying to find where I can add a filter, until I got to the mra record and saw there doesn't seem to be a parameter for it...seems like a big miss.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 09:43 AM
Thomas hi
Apologies I've only just seen you comment - hopefully you have resolved this - but just in case you haven't:
We actually have ended up writing our own MRA Modal - as we wanted to include a filter/search input , rather than a user paging through 500 pages of change requests, weirdly the OOTB MRA modal doesn't include (or at least didn't when we started this).
It's essentially a UI Builder Page - with a UX Data Broker - and a <now-input> search, a List and a few buttons. Doing this way would allow you to embed a conditional filter when searching for records - as you have full control of the code. We used the modal integration outlined above to use this instead.
If you want any further info please let me know.
Regards
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 02:16 AM - edited 11-10-2023 02:20 AM
Just got to say, I have been working on this exact issue (more or less) for a long time, and this thread was the first to actully help me achieve my goal. Thank you @David Hubbard and @Andy Smith2!
I had the same problem where I simply needed an Add button working in Workspace (Business Continuity Workspace in my case), with the same functionality as in Classic view (with the Edit... button).
However, I think there might have been an ootb solution provided by ServiceNow since this post was made that makes this task a whole lot easier! Looking through the list of available Add buttons in the Action Assignments table (sys_declarative_action_assignment), I noticed one of the buttons shared a lot of the same functionality I needed:
An Add button on a m2m table! Looking into that table, I noticed that the field under Specify client action is called "Common payload definition for Add buttons in GRC". Utilizing this existing client action, it completely eliminates all the need for scripting as well! This is how I did it:
1. Simply insert and stay and change the table to your m2m table.
2. Click on Advanced View, and change the values of these 3 fields:
- 1 and 2 are the two values of the tables that your m2m table is linking.
- 3 is the table you want to appear in the modal.
3. That is it! On my related list there is now a new Add button in Workspace view, giving me the possibility to choose records and create a new relationship in the m2m table. Just as you can do ootb in Classic view.
I might create a separate, updated post later explaining the steps in full for both New, Add and Delete button if this attracts some attention. Again, thank you Dave and Andy for pointing me in the right direction!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 05:28 AM
@arnekd hi. That's good to know. I too have learnt a lot by reference usage in ServiceNow applications like GRC.
One thought however (if I understand this right) - you did "Insert and Stay" to create the sys_declarative_action_assignment - there is a possibility that you have a dependency on GRC resources (which, as far as I am aware is not OOTB).
That may not be a problem, if you are deploying only in your environments and will always have GRC installed, but if this is for a Scoped Store Application you may want to duplicate all the other resources (common payload, addon_event_mapping ...) as well, to allow this to be free standing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 01:34 AM
Is there any way to increase the number of rows that is currently defaulted to 8 per page, there doesn't seems to be any paginational controls that could be modified to increase it to show maybe 10 or 20 rows per page.