lookup field sum
Posted: 2023-10-25 11:26
is anybody know how to sum in tableviewev lookup fields.
picture in attach
picture in attach
A place where AppGini users can exchange ideas and help each other.
https://forums.appgini.com:443/phpbb/
https://forums.appgini.com:443/phpbb/viewtopic.php?f=8&t=5252
<tfoot>
. Code: Select all
// file: hooks/TABLENAME-tv.js
jQuery(document).ready(function () {
const table = jQuery(`table.table[data-tablename='${AppGini.currentTableName()}']:eq(0)`);
const tfoot = table.children("tfoot:eq(0)");
const tr = jQuery("<tr/>").addClass("info").prependTo(tfoot);
table.find("thead:eq(0) > tr:eq(0) > th").each(function (i, e) {
const th = jQuery("<th/>")
.appendTo(tr)
.addClass("text-nowrap")
.append(i > 0 ? `cell #${i}` : '')
.append("<br/>")
.append(jQuery("<code/>").append(i > 0 ? `${jQuery(e)[0].classList[0]}` : ''));
});
});
i
-variable) or by evaluating class-name of cell, which should be in format TABLENAME-COLUMN.jQuery.getJSON(...)
and fetch sums from your server using your own API or 3rd party API.