Download Retool storage file with same name as selected row column

Hello,

I’d like to use the value of newOrders.selectedRow.orderID (Smith_00006) to download a file with the same name from Retool storage by clicking on the entry. I tried to follow this thread but didn’t get too far:

Any help is much appreciated!

Thanks,

Dylan

I was able to get the File ID with the JS query below after geting the Metadata from Retool Storage.

const selectedOrderID = newOrders.selectedRow?.orderID;
if (!selectedOrderID) return null;

const matchedFile = getFileMetadata.data.find(file => file.name === ${selectedOrderID}.xlsx);
return matchedFile?.id || null;

Thanks for sharing this update, @DylanSeq! Glad to hear you got it working. :+1: