Skip to main content

I am not a skilled in Java script and am struggling with the simplest of a problem. Any help to get me going would be appriciated.


Example:


// Trying to change content of “Test Field” in an existing record to “Paused”

// through a button function in that record.


let table = base.getTable(‘ACC Base’);


//Test Field is a Single Select Field


let field = table.getField(‘Test Field’);

let value = “Paused”;


// When run from a button field, the script skips the prompt

// and automatically uses the button’s record.


let record = await input.recordAsync(‘Choose a record’, table);


await table.updateRecordAsync(record,

{‘Test Field’: “Paused”});


//End

What is the field type of the field? You need to use the correct write format for the field type.


For example, if it is a single select field, you would use …


await table.updateRecordAsync(record, 
{'Test Field': {name: "Paused"}});

Reply