pythonguy123
pythonguy1239mo ago

In an app, in a table, if a button is clicked, a way to get thisRow(field) pass into inline script

It would be great if - In an app, in a table, if a button is clicked, a way to get thisRow(field) pass into inline script. For example if I click data in row 1, getting the id field of row 1 to pass into the inline script that is associated with the action button in that table's row. Currently I can reference the results in a Runnable's JSON results for example but I can't seem to find a dynamic way to interact with which row was clicked in the frontend.
3 Replies
pythonguy123
pythonguy123OP9mo ago
The closest thing I could find was selectedRow (object) from https://www.windmill.dev/docs/apps/app_configuration_settings/table#table-input But I'm not sure how to reference that as part of runnable inputs, so that my button's inline script will be fed the field from the table's clicked row.
Table | Windmill
The table component allows you to display a table.
pythonguy123
pythonguy123OP9mo ago
I think I figured this out: I put this into runnable inputs: nameOfMyTable.selectedRow.id Where id is whatever field name you need to pass in, from that table's row.
rubenf
rubenf9mo ago
You can simply use the row in the eval

Did you find this page helpful?