Zum Hauptinhalt springen

Zeilen Rendern

Live Beispiel

Beispielcode

context.enableModules();
const { TableGadget } = require("ou.sp.gadget.TableGadget");

const gadget = new TableGadget({
showOptions: false,
showFooter: false,
select: false,
columns: {
iban: {
label: "IBAN",
render: function (options) {
if (!options.row) {
return "";
}
// Check for access profile
return (
options.row.iban.substring(0, 5) +
"xxxxxxxxxx" +
options.row.iban.substring(options.row.iban.length - 3)
);
},
},
},
rows: [
{
iban: "NL80ABNA8805798800",
},
{
iban: "DE41500105171978531834",
},
{
iban: "DE12500105172474267346",
},
],
});

context.returnValue = gadget.transfer();