Import: Column not found: 1054 Unknown column 'grade' in 'field list'
Hi,
I have an import action in a relationship manager, with the following fields:
Then in resolveRecord(), I check if the record exists (firstOrCreate) and attach to its parent. The value from grade should be saved in the pivot table.
If I import name and birthday only, everything works as expected. But as soon as I add grade, I get the following error:
The script tries to add the grade to the participant table when creating a new participant, which does not exist. How to tell it to ignore "grade" when creating a new participant?
I tried setting 'birthday' a second parameter, in hope it would then only consider name and birthday. But it does not.
Is this even the right way to handle this import action?
Thanks
Solution:Jump to solution
I solved it by adding an empty ->fillRecordUsing(function (Participant $participant, string $state) {
})...
1 Reply
Solution
I solved it by adding an empty ->fillRecordUsing(function (Participant $participant, string $state) {
})