Attempting to combine two values in one table cell

I am trying to combine two values from my Retool database in the same cell in a table. Specifically, the two values are dealer and customer. I want the end result to look like this in the cell:

Dealer X (Doe): dealer name first and customer name in parentheses. I did some research and it said the following code should work by putting it in a custom column in the table:

{{ currentRow.dealer + ' ( ' + currentRow.customer + ')' }}

But I keep getting the following error:

ReferenceError: currentRow is not defined,ReferenceError: currentRow is not defined,ReferenceError: currentRow is not defined

Is there a different way to do this?

1 Like

Hey @tomm,

Can you share a screenshot of where you're adding this line of code?? This should work when adding it to the mapped value settings of the custom column. Try also currentSourceRow

Using currentSourceRow did the trick. Thanks.

Hey @MiguelOrtiz. Do you know if there is a way to control the border thickness around each cell in a table?

Hi Tom,

I do simple combining of text or counting operations in the SQL query SELECT code.

It may vary according to which SQL you use. But in mine (mariadb) there is a "concat" function which is easy to use....

SELECT concat(Code, " ", Name) AS Package_code_and_name
FROM tbl_Package_titles