function onload(executionContext) {
var formContext = executionContext.getFormContext();
//Set a delay of 3 seconds to wait for the form to finish loading.
setTimeout(() => {
var gridContext = formContext.getControl("Subgrid_new_1"); // Fill in the parentheses with the name of your subgrid.
var gridRows = gridContext.getGrid().getRows().get();
var nameArr = []; //Claims an empty array to store the value of the Full Name field.
for(var item of gridRows){
nameArr.push(item.getAttribute("name").getValue()); // Fill the array with the value of the Full Name field for each row.
}
//Get the HTML elements of the subgrid via the query selector.
var subgridControl = parent.parent.window.document.querySelector("div[data-control-name='Subgrid_new_1']");
//Gets a collection of subgrid rows.
var rowsList = subgridControl.querySelector("div.ag-center-cols-container").children;
for(let i=0;i<rowsList.length;i++){
var nameField = rowsList[i].children[1];
//Set the tooltip for the Name column.
nameField.title = `name:${nameArr[i]}`;
}
}, 3000);
}