Dear all,
I have a report that shows some data in a dialog in a Table. Now I also have a button in the dialog to replace the data in that table:
var data = [];
data.push([true, "test", "test", "test", "test"]);
this.dialog.getPage(0).getDialogElement("DetailsTable1").setItems(data);
After running the code I expect the table to be updated, but it never gets updated.
I have another simple test button that does the following:
this.dialog.getPage(0).getDialogElement("DetailsTable1").addRow();
This adds a simple row and does work.
What do I need to do update the table with new data after a button click?
Kay Fischbach on
The
items
parameter ofTable.setItems
says in the ARIS Report script referenceSince your
data
starts with the valuetrue
which is of typeBoolean
instead ofString
the result of the method is undefined behavior.Edit: if you just want to print "true" in the table, replace
true
withString(true)
. Otherwise create a function that takes aBoolean
as an argument and returns the string you want to print and replacetrue
with the function call.