Trigger dynamic queries from dynamic rows

Hi,

How to trigger a query based on current row value and show the result in the "custom column" in same row.

When i set the custom column value based on the result then it is reflecting in all the dynamic rows instead of reflecting Only in current row.

Thanks

You can use an event handler OnClick or OnSelect then pass in the custom column using table.selectedRow.[custom_column].value

i wanted to retrieve data on page load.

i will explain with example:

Query1: Select all from table1
the result is displayed in tabular form with additional custom column

now i need to get values for this custom column from table2 where id=currentRow_id

so onload of this particular page i have to trigger query1->to fetch all records and query2-> to fetch data based on the current row

Hey @Ebnazer! Custom columns are a little trickier to access than regular columns.

But this syntax should hopefully work for you:

{{table1.columnMappers['Custom Column 1'][table1.selectedRow.index]}}

We're first accessing the custom column through the .columnMappers property then grabbing the correct value by passing in the index of the selected row. Here are our docs on custom columns and here's a link to a community post with a couple examples of using (or not using) custom columns.

Let me know if you have any questions!

1 Like