Hi! I have 2 tables from which I am making some matches with scores. There results need to be put in the third table. I am trying to create new records like this:
for (let i = 0; i < 5; i++) {
let mentor_index = ranked_mentors_indexes[i];
let new_matching = {
"Unique IO Mentee": mentees.records[mentee_index].getCellValue(field_mentee_index),
"Unique ID Mentor": mentors.records[mentor_index].getCellValue(field_mentor_index),
"procentage": similarity_matrix[mentee_index][mentor_index],};
await table_matchings.createRecordAsync(new_matching);
}
I am getting this error that I do not know how to resolve:
No overload matches this call.
Overload 1 of 2, '(fields: { "Unique ID Mentee"?: readonly { id: string; }[] | undefined; fldBBVDi3w6mPEQHI?: readonly { id: string; }[] | undefined; "Unique ID Mentor"?: readonly { id: string; }[] | undefined; fldb2AlrU2AJShSc3?: readonly { id: string; }[] | undefined; procentage?: number | undefined; fldgTMwV2nFs4Uv26?: number | undefined; }): Promise<...>', gave the following error.
Argument of type '{ "Unique IO Mentee": string; "Unique ID Mentor": string; procentage: any; }' is not assignable to parameter of type '{ "Unique ID Mentee"?: readonly { id: string; }[] | undefined; fldBBVDi3w6mPEQHI?: readonly { id: string; }[] | undefined; "Unique ID Mentor"?: readonly { id: string; }[] | undefined; fldb2AlrU2AJShSc3?: readonly { id: string; }[] | undefined; procentage?: number | undefined; fldgTMwV2nFs4Uv26?: number | undefined; }'.
Types of property '"Unique ID Mentor"' are incompatible.
Type 'string' is not assignable to type 'readonly { id: string; }[] | undefined'.
Overload 2 of 2, '(fields: { "Unique ID Mentee"?: readonly { id: string; }[] | undefined; fldBBVDi3w6mPEQHI?: readonly { id: string; }[] | undefined; "Unique ID Mentor"?: readonly { id: string; }[] | undefined; fldb2AlrU2AJShSc3?: readonly { id: string; }[] | undefined; procentage?: number | undefined; fldgTMwV2nFs4Uv26?: number | undefined; }): Promise<...>', gave the following error.
Argument of type '{ "Unique IO Mentee": string; "Unique ID Mentor": string; procentage: any; }' is not assignable to parameter of type '{ "Unique ID Mentee"?: readonly { id: string; }[] | undefined; fldBBVDi3w6mPEQHI?: readonly { id: string; }[] | undefined; "Unique ID Mentor"?: readonly { id: string; }[] | undefined; fldb2AlrU2AJShSc3?: readonly { id: string; }[] | undefined; procentage?: number | undefined; fldgTMwV2nFs4Uv26?: number | undefined; }'.
Types of property '"Unique ID Mentor"' are incompatible.
Type 'string' is not assignable to type 'readonly { id: string; }[] | undefined'.