UI Builder – Transform Data Broker showing “Data resource is not configured”
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2026 08:47 PM - edited 02-11-2026 08:48 PM
Hi All, @Mark Roethof @Ankur Bawiskar @Ravi Gaurav
I am implementing a use case in UI Builder (Workspace) where I need to identify duplicate accounts and navigate users to a filtered list view.
We maintain user records in a custom table x_user_directory
Requirement:
When a user clicks a “Duplicate User” tile in UI Builder:
Detect duplicate accounts based on:
email
employee_number
(optionally compare with sys_user.email)
Collect duplicate record sys_ids
Navigate to the list of such records
Current Implementation
1️⃣Data Broker Server Script (Transform Type)
I created a Data Broker Server Script (Transform) with logic similar to:
(function transform(input) {
var dupRecordsMap = {};
// Duplicate check in custom table
var ga = new GlideAggregate('x_user_directory');
ga.addAggregate('COUNT', 'email');
ga.addNotNullQuery('email');
ga.groupBy('email');
ga.query();
while (ga.next()) {
if (ga.getAggregate('COUNT', 'email') > 1) {
var gr = new GlideRecord('x_user_directory');
gr.addQuery('email', ga.email);
gr.query();
while (gr.next()) {
dupRecordsMap[gr.getUniqueValue()] = true;
}
}
}
// Optional cross-check with sys_user
var userGR = new GlideRecord('sys_user');
userGR.addNotNullQuery('email');
userGR.query();
while (userGR.next()) {
var userGR = new GlideRecord('x_user_directory');
userGR.addQuery('email', userGR.email);
userGR.query();
if (userGR.getRowCount() > 1) {
while (userGR.next()) {
dupRecordsMap[userGR.getUniqueValue()] = true;
}
}
}
var ids = Object.keys(dupRecordsMap);
return {
sysIds: ids.join(','),
count: ids.length
};
})(input);2️⃣Output Schema
Added this Output Schema:
{
"type": "object",
"properties": {
"sysIds": {
"type": "string"
},
"count": {
"type": "number"
}
}
}3️⃣ACL Configuration
Initially, I received:
ACL did not allow execution
To fix this, I created:
ACL Type: ux_data_broker
Operation: execute
Name: sys id of data broker server script
Role: admin
Now the ACL error is resolved.
UI Builder still shows:
Data resource is not configured
Add details in the configuration for Duplicate Account IDs to review the data output
Please help me to understand how to navigate on required list of duplicate records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2026 11:24 PM
I am facing the same issue today, did you get a solution to this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2026 12:15 AM
Okay, I faced the same problem, and the error was that the script had an error, preventing it to return the expected value correctly. I noticed that in your script you are redefining userGr inside a while, so I suppose a critical error is happening there. Try this:
(function transform(input) {
var dupRecordsMap = {};
// Duplicate check in custom table
var ga = new GlideAggregate('x_user_directory');
ga.addAggregate('COUNT', 'email');
ga.addNotNullQuery('email');
ga.groupBy('email');
ga.query();
while (ga.next()) {
if (ga.getAggregate('COUNT', 'email') > 1) {
var gr = new GlideRecord('x_user_directory');
gr.addQuery('email', ga.email);
gr.query();
while (gr.next()) {
dupRecordsMap[gr.getUniqueValue()] = true;
}
}
}
// Optional cross-check with sys_user
var userGR = new GlideRecord('sys_user');
userGR.addNotNullQuery('email');
userGR.query();
while (userGR.next()) {
var dirGR = new GlideRecord('x_user_directory');
dirGR .addQuery('email', userGR.email);
dirGR .query();
if (dirGR .getRowCount() > 1) {
while (dirGR .next()) {
dupRecordsMap[userGR.getUniqueValue()] = true;
}
}
}
var ids = Object.keys(dupRecordsMap);
return {
sysIds: ids.join(','),
count: ids.length
};
})(input);Also I think that the output schema is not really necessary. If it is still not working, try to remove it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @Surbhi16 ,
Did you find a solution to how to make it work after that I am facing similar issue but I did try the script in background script and it was working fine but my inputs are not getting captured and my script is not getting triggered which I think is the main reason to why it's not working. If you do find a solution do let me know. Thanks!
