Jorge Solá 9/17/2026 5:52:55 AM Hi, Rafael.
In the absence of a native TeamDesk feature to display only Totals or only the Grand Total, here is a script that allows you to hide one or the other.
How to use it: - Check the Totals checkbox for the numeric columns that you'd like Totals or the Grand Total displayed. - Copy the script below to your dbscript-v3.js file in Resources, or add a file by this name containing the script. - Edit the script header by listing the ids of the views in your database where you'd like the script to run (lines 3 & 4) - List the default dashboards where you'd like the script to run (line 8) - Select whether you want to hide the Totals or the Grand Total (line 23) - Save the script
Let me know if it does not work as expected.
Here is the script:
/*** ===== Header: configure here ===== ***/ const TARGET_VIEW_IDS = [ 15557841, // List Changed 15557840 // List All ];
const TARGET_DASHBOARD_TABLE_IDS = [ 1772447 ];
/* Choose what footer labels to hide. Allowed values: - "Grand Total" - "Total"
Examples: ["Grand Total"] -> hides only Grand Total ["Total"] -> hides only Total ["Total", "Grand Total"] -> hides both */ const FOOTER_LABELS_TO_HIDE = [ "Grand Total" ];
(function () { function getNumParam(name) { const params = new URLSearchParams(window.location.search); return Number(params.get(name)) || 0; }
function isDirectTargetView() { return TARGET_VIEW_IDS.includes(getNumParam("id")); }
function isTargetDashboard() { return !getNumParam("id") && TARGET_DASHBOARD_TABLE_IDS.includes(getNumParam("t")); }
function shouldRun() { return isDirectTargetView() || isTargetDashboard(); }
function normalize(text) { return (text || "").replace(/\s+/g, " ").trim().toLowerCase(); }
function shouldHideLabel(labelText) { const label = normalize(labelText); return FOOTER_LABELS_TO_HIDE.some(x => normalize(x) === label); }
function hideSelectedFooterRows() { if (!shouldRun()) return;
document.querySelectorAll("tr.v3-tableview__groupfoot-row").forEach(row => { const firstCell = row.querySelector("th, td"); const label = firstCell ? firstCell.textContent : "";
if (shouldHideLabel(label)) { row.style.display = "none"; } }); }
function start() { hideSelectedFooterRows(); setTimeout(hideSelectedFooterRows, 300); setTimeout(hideSelectedFooterRows, 1000); setTimeout(hideSelectedFooterRows, 2000); }
if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", start); } else { start(); } })();
|