Hi,
I replay your scenario using some unsupported code.
First, you need to add a subgrid to you form. I used Lead Entity as an example. I added the subgrid within a section wish is hidden by default.

Then you can add this JS function in onLoad event. This function inject dynamically a fetchXml to the subgrid. Basically, I retrieve leads with the same Topic, FirstName and LastName.
function getDuplicates(executionContext) {
var formContext = executionContext.getFormContext();
if (formContext.ui.getFormType() != 1) {
var duplicatesGridControl = formContext.getControl("Duplicates");
if (duplicatesGridControl == null) {
setTimeout(getDuplicates, 2000);
}
else {
var leadId = formContext.data.entity.getId().replace("{", "").replace("}", "");
var firstName = formContext.getAttribute('firstname').getValue();
var lastName = formContext.getAttribute('lastname').getValue();
var topic = formContext.getAttribute('subject').getValue();
var fetchData = {
subject: topic,
firstname: firstName,
lastname: lastName,
leadid: leadId
};
var fetchXml = [
"",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
"",
].join("");
duplicatesGridControl.setFilterXml(fetchXml);
duplicatesGridControl.refresh();
var summaryObj = formContext.ui.tabs.get("Summary");
var duplicatesObj = summaryObj.sections.get("Summary_Duplicates");
duplicatesObj.setVisible(true);
}
}
}
Hope this helps, good luck :)