Filter modal table based on UUID of another table


The objective is to open a modal so that I can manage metadata records for a particular charity.

I have a table component that list a number of charity records including a UUID as pk. I have set up a row action event listener to open a new modal and I want to filter that new table based on the The new table list the records that contains the ids for some metadata that I want to be able to control.

I have tried updating the sql to both directly view the {{}} directly and I have also tried to pass this via a variable.

With the variable approach:

SELECT * FROM charities_meta
WHERE charities_meta.charities_id = {{ charity_uuid }}

I get this error "invalid input syntax for type uuid: "{"pluginType":"State","id":"charity_uuid","persistedValueKey":"variable1","persistValue":false,"value":"49039118-3fea-43ea-8506-6d89f8470ed8","_desktopMargin":"","_mobileMargin":""}""

With querying the or selectedRowKey direct, I get no records.
I have confirmed that the uuid is being passed into selectedRow but nothing is working.

Help :smile:

From what I can gather...

charity_uuid is a transformer? variable? if so, that error is giving you the hint. It says that object is the wrong type, but that object has .value with your uuid!

Try {{ charity_uuid.value }}


SELECT * FROM charities_meta
WHERE charities_meta.charities_id = '{{ charity_uuid }}';

I've noticed in some of my select statements I have to enclose the js parts with single quotes like below


1 Like

It is a variable and .value worked :man_facepalming: Thanks