Part of my custom APP takes a number of different user inputs from a UI, and writes some of the resultant information as a new record in a table. In particular I want to do the following:
-
Write a string value to a linked field in an existing table
-
The string value to be passed is already guaranteed to exist as one of the linked options (since the user selected from a Select menu which is in turn populated from the table.
*There are some other fields which need to be written as part of this record. The code looks something like the following.
`` let machineNameField=tableTasksByMachineNumber.getFieldByNameIfExists(‘Machine Name’);
let machineNamesRecord=useRecords(tableTasksByMachineNumber,machineNameField);
let machineNamesList=machineNamesRecord.map(record=>
{return(record.getCellValueAsString(machineNameField))});
let machineNamesListFormatted=machineNamesList.map(x=>{return({label: x, value:x})});`
Machine Selection
<Select
value={machineId}
options={machineNamesListFormatted}
onChange={setMachineId}
/>
// at this point the machineID variable is set by the useState react hook.
//I want to create the new record on clicking a confirmation dialog, as shown in the below snippet for my event handler
onConfirm={() => {
tableMaintenanceTickets.createRecordsAsync([
{'fields': {
"Machine Number / Station": [{machineId}]
}}]
),
When I run this code I get the following error:

NOTE: I can create the record when I pass an empty array through the createRecordsAsync method.
Any help/insight would be much appreciated