I’m trying pass a string as a field - which I’m pretty sure I’ve seen @kuovonne explain someone else that it’s possible.
const mainCur = base.getTable("Contacts").getView("Currency");
const mainCurMatchField = 'Currency name'
const mainCurrencyConversion = async (tableView, matchField) => {
let selectRecords, gbp, eur, usd
selectRecords = await tableView.selectRecordsAsync();
gbp, eur, usd] = await getConversion('test')
for (let record of selectRecords.records){
console.log(record.getCellValue(matchField))
}
};
await mainCurrencyConversion(mainCur, mainCurMatchField)
I’m trying to get record.getCellValue(matchField) to use ‘Currency name’ as field name. I’ve tried to wrapped it in {}, but so far I’ve been out of luck.
Is this possible or is it me who got this wrong?