So I have an issue where I need to take the user selection, in this case the department and job they have selected and then they click clockin, this registers this in sharepoint against their id, however it keeps on giving two errors
Incompatible type. The 'Id' column in the data source you’re updating expects a 'Number' type and you’re using a 'Error' type. Name isn't valid. 'ID' isn't recognized. Keeping getting the error Invalid argument type. Expecting a Record value, but of a different schema.
`Patch(
'Employee Portal',
Defaults('Employee Portal'),
{
'EmployeeID': Text(First(BarcodeReader1.Barcodes).Value), the barcode scanner
ClockInTime: DateAdd(Now(), -TimeZoneOffset(), TimeUnit.Minutes),
// Department lookup field (from ddldepartment dropdown)
DepartmentName: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: ddldepartment.Selected.ID,
Value: ddldepartment.Selected.Value
},
// JobType lookup field (from ddljob dropdown)
JobType: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: ddljob.Selected.ID,
Value: ddljob.Selected.Value
}
}
);`
I have tried to remove and re-add the data sources, ensure the formulas are correct and ensured that it can see the ID generated by sharepoint