MGOPW
ServiceNow Employee
ServiceNow Employee

Overview

In this tutorial, you’ll learn about Popovers and how to implement them in UI Builder!
 
Family Release: Xanadu
UI Builder Release: 26.2.59
Roles Required: admin
 
Authored by: @michaelburney
📢

Prerequisites

Before starting this tutorial, ensure you've completed the necessary prerequisites to follow along smoothly. Here are some key articles you might need to reference:

Popovers, what are they?

 
A popover in UI Builder acts like an overlay or tooltip that appears when a user interacts with a particular UI element. For example, if you're building a dynamic Data Visualization, you might use a popover to display informative details to the end user about interactability (e.g., can filter by click, click to see list updates, etc) when a user hovers over the Data Visualization. This helps maintain a clean UI while making informative or critical information readily accessible.

 

Scenario

You are building a Data Visualization for your organization's management team. On the page that contains the Data Visualization, you display a list of Incidents. When a user hovers over the Data Visualization, a popover needs to appear alerting the user of additional functionality. This ensures that managers can quickly be notified of additional functionality without any previous knowledge of such.

 

Lets open our Customer Support Workspace and build it out!

 

Step 1: Open UI Builder

 

1. In your ServiceNow instance, use the Unified Navigator to go to Now Experience Framework > UI Builder.

2. When UI Builder opens, you should see the home screen.

3. Select the Experiences tab at the top of the screen.

 

MGOPW_0-1738699335555.png
 

4. Open the Customer Support Workspace

 

Step 2. Open Home Base

 

1. Open the Home Base page by selecting the Default variant underneath its page listing.

 

MGOPW_1-1738699335555.png
 

 

Step 3. Create Popover

1. In the Content Tree, underneath the Overlays category, select the + (plus icon) next to Popovers, to add a new popover to the page.

 

MGOPW_2-1738699335556.png

 

2. Select Custom popover.
 
MGOPW_3-1738699335557.png

 

3. Underneath Container 1, click on the + Add content row.
 
MGOPW_4-1738699335557.png

 

4. Search for Rich text in the component window.
5. Select Rich text component.
 
MGOPW_5-1738699335558.png

 

 

Now the Rich text component has been added to the popover container, so lets give it some content

 

Step 4. Update Rich Text component

 

1. In the Content tree, underneath Container 1, select the Rich text 1 component.

2. In the Component Configuration panel, underneath the Configure tab, hover over the Edit HTML button, select the Data Bind icon (stacked circles).

 

MGOPW_6-1738699335560.png

 

3. In the Bind data to HTML window, navigate to the Formulas tab.
4. Select the  String category on the left.
5. Select the CONCAT formula. Once it's selected, a small arrow should appear. Select the small arrow to move the formula pill to the top of the window.
 
MGOPW_7-1738699335561.png

 

 
6. Double click value1 then change the entry to "query invoked: " (including double quotes).
 
MGOPW_8-1738699335562.png

 

7. Double click the values pill, then navigate to the Data types category on the left, next to Formulas.
8. Select the Client states category.
9. Select queryParam pill, then select the small arrow that appears to add it to the formula.
 
MGOPW_9-1738699335562.png

 

10. Click Apply.
 

Step 5. Add Event functionality

 

1. On the Content tree, underneath Column 1, select the Pie 1 component.

2. In the Component configuration panel, select the Events tab.

3. Click the Add event mapping button.

4. In the Event configuration pop up, select the Visualization Clicked event, then click Continue.

 
MGOPW_10-1738699365679.png

 

5. In the Choose a handler step, select Open popover then click Continue.
 
MGOPW_11-1738699365680.png

 

6. On the last section, under Configure, select Choose existing.
7. In the Popover field that appears, select Custom popover 1, then click Add.
 
MGOPW_12-1738699365681.png

 

 

Step 10. Save and Preview

 

1. Click the Save button in the upper-right corner of UI Builder.

2. Click the Preview button, or open the experience in a new tab. 

3. Select the slices of the pie chart, you should see a popover with the query of the slices selection.

 

MGOPW_13-1738699365682.png
 

Conclusion

Congratulations! ðŸŽ‰ You've now added a dynamic popover to our interactive data visualization! Now we can get further insight into the mechanics of our visualization in real time!

 

If you found this guide helpful, consider sharing it with peers or teams looking to elevate their UI Builder skills with dynamic visualizations.

 

Keep an eye out for future tutorials where we’ll dive deeper into crafting immersive, data-driven experiences. Until then—happy designing, and stay curious!

Check out the Next Experience Center of Excellence for more resources

1 Comment