Skip to main content
Solved

Converting ASCII values

  • March 10, 2020
  • 1 reply
  • 36 views

Is it possible to convert integer values into ASCII characters in Formula columns? Pseudo code example: convertToChar(71) returns the char ‘G’.

Best answer by JonathanBowen

Hi @Josh_Jennings - don’t think you can do this with a formula, but you can achieve it with a script block:

// @ts-nocheck
let table = base.getTable("Table");

let tableQuery = await table.selectRecordsAsync();

for (let record of tableQuery.records) {
    let result = record.getCellValueAsString("Name");
    let updateValue = String.fromCharCode(result);
    await table.updateRecordAsync(record, {
        "Result": updateValue
    })
}

JB

1 reply

JonathanBowen
Forum|alt.badge.img+18
  • Inspiring
  • Answer
  • March 10, 2020

Hi @Josh_Jennings - don’t think you can do this with a formula, but you can achieve it with a script block:

// @ts-nocheck
let table = base.getTable("Table");

let tableQuery = await table.selectRecordsAsync();

for (let record of tableQuery.records) {
    let result = record.getCellValueAsString("Name");
    let updateValue = String.fromCharCode(result);
    await table.updateRecordAsync(record, {
        "Result": updateValue
    })
}

JB