I'm sure it's quite simple but I can't find the right way to get it. I Hope somebody can point me in the right direction
I've two tables, Books and Sales. The Sales table has a field 'ISBN' and I wrote a function which loops over every Sales row and searches for that ISBN-value in the Books table. When found, it returns the object of this book and I can reference it in the Sales table. That works fine.
But sometimes the value I'm searching for ist not in the ISBN field in Books, but in the ISBN_Legacy field, which is an array of mutiple values.
I'm able to find that value, but it returns only the ISBN value. How can I get the object of that whole entry? I also think my function is not very elegant, since I tried to solve that with conditionals. Maybe there is an easier way with filters or get/set, but I can't wrap my head around it at the moment.
When the value is found in the ISBN_Legacy array, I need to get the same object back like when I found it in the ISBN field.
Thanks in advance, any help is appreciated.
Stefan