How do I create an action based on the contents of the row?

I would like to have a table with actions on the row that links to the original data. To get to the original data for a given row, I need to concatenate a URL with the contents of the row. Therefore, I'd like to create an action button that will open a URL composed of information from the row. Is this possible? Or am I required to use JS transformers to try and accomplish this?


Hey @51Forge, happy to help!

You could likely create a custom column with the type set to Button. Then you can use the currentRow property to grab the relevant column data that is needed in the URL. Here is a mock-up of what your button column could look like:


JAY! There's the secret, currentRow will definitely do it. Thanks mate, appreciate it.

My pleasure! :grin:

Is something like this possible for queries?

I have a query I'm using multiple places, and I don't want to create a separate script to handle a delete button on a table row:

Hey Nicolai, I'd be interested to see your DeleteSupplier query. Feel free to share a screenshot of that!

Due to the fact that your query would lose context of i and currentRow, you'd likely need to use selectedRow in your query to select the correct row.

If you intend to use an action button, you can disable the action button for any row(s) that are not selected to ensure you're only deleting the selected supplier: