
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2019 08:18 AM
Hello,
Is there a way to copy/clone a PA widget in it's entirety? Insert and Stay copies the widget, but not with the indicators attached. Looking for something like 'Insert and Stay with Relations' that Automated Indicators have.
Reason:
Setting up SLA Dashboards and I've been asked to create multiple tabs with List Scorecard views, 4 of them per tab * 3 tabs (Monthly/Weekly/Daily) = 12 Widgets each that have anywhere between 4-16 Indicators. I have 9 different Dashboards I need to do this for and it's becoming extremely tedious manually adding the indicators to each widget. Indicator groups is a no go as I need to customize the label and order on each one added to the widget.
Thanks!
Solved! Go to Solution.
- Labels:
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2019 12:18 PM
You can create a UI Action visible on the form of table pa_widgets with the following code:
doInsertWithIndicators();
function doInsertWithIndicators() {
var originalWidget = current.sys_id.toString();
var newWidget = current;
var id = current.setNewGuid();
var indicators = new GlideRecord('pa_widget_indicators');
indicators.addQuery('widget', originalWidget);
indicators.query();
while (indicators.next()) {
indicators.widget = id;
indicators.insert();
}
current.insert();
action.setRedirectURL(newWidget);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2019 05:26 AM
If you need the same widget you can just add it from picker by name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2019 12:18 PM
You can create a UI Action visible on the form of table pa_widgets with the following code:
doInsertWithIndicators();
function doInsertWithIndicators() {
var originalWidget = current.sys_id.toString();
var newWidget = current;
var id = current.setNewGuid();
var indicators = new GlideRecord('pa_widget_indicators');
indicators.addQuery('widget', originalWidget);
indicators.query();
while (indicators.next()) {
indicators.widget = id;
indicators.insert();
}
current.insert();
action.setRedirectURL(newWidget);
}