I have made an app with two tables to datasources A and B.
B is a relation to A (via common Id field).
So I want to display table A, and below it, Table B.
Ideally, just clicking on a row in A should
a) select that row, and then b) update table B to show the related items in datasource B.
I have not been able to have this done automagically by appmaker, but I could add code for onload on table A like this:
app.datasources.A.query.filters.B.Id._equals = widget.datasource.item.Id;
app.datasources.B.load();
and on the onClick Event in the tableARow itself, I also added:
app.datasources.A.selectIndex(widget.parent.childIndex);
app.datasources.B.query.filters.B.Id._equals = widget.datasource.item.Id;
app.datasources.CurrentValuation.load();
That mostly works, except for the fact that TableA will not actually select the row I clicked on in the UI (selected row is always the second one). The datasource selects the right item for tableB, but the UI shows the wrong row selected in TableA.
I suspect I either need to call another method, or maybe there is an altogether better approach and I'm a bonehead. Either way, thanks for any answers!