Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Add Filter to EA Workspace Rationalization using UI Builder

fibssy
Tera Guru

Hi,

I want to add one or more filters to the Rationalization Bubble Chart page in the EA Workspace.

 

I am able to add the filter, but I cannot get the filter to be applied properly after I select it. I have tried several things already and arrived at the point where I need step by step to het this to work properly.

 

What have I done so far (in this example : IT Application Owner):

1. Added Filter within UI Builder:

fibssy_0-1716902058972.png

2. Set the Events:

fibssy_1-1716902102944.png

3. Set Client State parameter

fibssy_2-1716902198936.png

 Result:
I can select a user and apply this, but this doesn't reflect in the bubble chart

fibssy_3-1716902276352.png

 

I would appreciate some help here. I already read the docs, but the instructions there are very limited and not sufficient.

 

Thank you in advance.

 

Fibssy

 

1 ACCEPTED SOLUTION

fibssy
Tera Guru

This is the solution to this question:

NOTE: In this solution you will be modifying out-of-the box scripts.  It will be necessary to check and make sure the scripts are not skipped on next update.  

 

Step 1: Open te page you want to add the filter on in UI Builder Editor. In this example I will use the Application Rationalization page on the Enterprise Architecture Workspace

 

Step 2a: Add the Filter Component to the page ( in this example: IT Application Owner on the Business Application table)

fibssy_0-1721640672426.png

 

Step 2b: Add the : Apply PAR Filters script to the component

fibssy_1-1721640771924.png

 

Step 3: Create a new state parameter:   Under Client state: Add a new Client state with Type JSON and initial value: Object. This state parameter holds the filter value, which we will use in a later statdium.

 

fibssy_2-1721641041490.png

 

Step 4a: Under Data open the App Rationalization Relations 1 data resource and add the Filter to this resource

fibssy_3-1721642895250.png

 

Step 4b: Do the same for the  App Rationalization Grid Data 1 data resource:

fibssy_4-1721643075300.png

 

Step 5: Open the script include that is linked to the 2 data sources from step 4

fibssy_5-1721643162724.png

 

5a : For the List view: Open the AppRationalizationDataBroker script include, 

       in the _applyFilters function, add the newly created filter

fibssy_6-1721643386863.png

 

5b: For the bubblechart view Open the AppRationalizationBubbleDataBroker script include,

in the _getFilterQuery function, add the newly created filter:

fibssy_7-1721643755469.png

6: Modify the following UI Builder client scripts

 

6a. Fetch bubble data

fibssy_8-1721643934734.png

6b. Apply PAR Filters

fibssy_9-1721644082731.pngfibssy_10-1721644111211.png

6c. Refresh bubble data

fibssy_11-1721644244218.png

 

RESULT:

 

Without Application Owner Filter:

fibssy_12-1721644315005.png

 

With Application Owner Filter

fibssy_13-1721644399590.png

 

 

Good Luck!!

View solution in original post

11 REPLIES 11

PaulSylo
Tera Sage
Tera Sage

HI @fibssy ,

 

I think you need to tweak some things here, on the "apply PAR Filters" client scripts. looks like only default filter are coded and shipped as Out of box code. 

 

PaulSylo_0-1716956706388.png

 

Regards,
PaulSylo

Kindly mark "helpful", if this helps, or Mark as "Accepted " if it solves your issues !

Hi ,

Thank you for your response. I tried this and it still didn't work unfortunately. :(... I submitted a request at NowSupport for some assistance to guide me in the right direction, since the available documentation is not sufficient.

 

Fibssy

 Looks like there is a limitation in adding this filter to the code. 

Regards,
PaulSylo

Kindly mark "helpful", if this helps, or Mark as "Accepted " if it solves your issues !

I raised a case with ServiceNow support. Waiting for a response now.