Conditional query from table

Hi all,

I am using retool to allow end users to update/verify addresses from a DB. they select the record and if they are happy with it, they can click a button that updated the row with keep_record = 1, of they are not, they can change the data and update the record.

the issue i'm facing is that if they are happy with the data i can use, however if they update the data in anyway i have to use table.recordUpdates['0'].address_line.

is there any way to select the correct value conditionally based on whether table1.recordUpdates['0'] has a value?

never mind.. i figured out i can {{ table1.recordUpdates.length > 0 ? table1.recordUpdates[table1.selectedRow.index].address_1 :}}

1 Like