Dynamic Currency Type

I have a database table with a column for 'website' and a column for the corresponding 'currency', and a Retool query for that data called domainCurrencies.

In my application I have a table (table4) that displays pricing data from those same websites. The 'price' field is formatted as a currency, and I would like the 'currency code' field to be dynamic, based on the website in that row of the table.

image

image

I'm struggling with the best way to do this. I've tried a few approaches involving currentRow but have run into various errors and thought I'd ask this group as I'm sure this is something that's been done before.

Hi @pod2,

Do you have the currency code for the website in your data? If you do and it's essentially just a hidden column, you could just put something like this in the "Currency code" box.
{{ currentSourceRow.currencyCode }}

This assumes your data is coming back from a column called currencyCode.

The currency code was not in my data as a column, so I went ahead and changed the original query to append/join the code from another table, then followed your advice.

Thank you for the help!

1 Like