Hello,
I believe this is simple, but I don’t understand what syntax is needed. I’m trying to read the results of a single-select field as a string. I’m doing a running total calculation, but resetting it whenever a certain reading is found. The running total part was working, but I can’t figure out how to get the single select output as a string.
When I run this, I get:
typeof respGroup.records[0] returns “Object”
output.text(typeof respGroup.records[0].getCellValueAsString) returns “Function”
let table = base.getTable(‘Prints’);
let view = table.getView(‘MTBF layout’);
let respGroup = await view.selectRecordsAsync({fields: [‘NDD - Responsible Group’]}); //NDD - Responsible Group must be manually filled out!
let elapsedTime = await view.selectRecordsAsync({fields: [‘NDD - Elapsed print time’]}); //NDD - Elapsed print time is a calculated field
let groupRecords = respGroup.records;
//trying to understand how to get the group records into a string format
output.text(typeof respGroup.records[0])
output.text(“and the record is”)
output.text(typeof respGroup.records[0].getCellValueAsString)