How to work with multiple-item references?

Hi @marlowe-shaeffer . Thanks for your input on this, but I already went through all that documentation - to me it’s not clear what the best approach would be in my case.

First of all, I cannot use intermediary datasets because they do not provide enough flexibility (e.g. filtering/sorting when working with composite data types is not possible - well filtering is, but …). This means I extract my data, store them in an object at the application layer and continue from there. Hence most of the documentation is already irrelevant.

Secondly, I’d like to keep things simple. I would expect there’s a simple query I could write to call both datasets, manipulate them and store the result. From what I understand - there are two ways: either I use query/include(), or I use queryReferenced(). Seems that query/include() has its limitations though (only 50 referenced items can be returned), so I cannot use it if the result contains more than 50 rows. The latter only works for multiple-item reference fields, so somehow I need to create these multiple-item reference fields.

Knowing that, my assumption is that I should use insertReference( ), but this is something that you do on item-level, or? That’s what I understand from the API reference. Hence I need to loop over all my row to set that reference? That can’t be the case right? And how can you make it a multiple-item reference field? Like I said, I really don’t get it… It seems overly complex for a simple inner join…

So if you could look at my use case again, taken into account that I do everything in code (no datasets usage, no specific settings in the Wix editor, …) and provide me with some pseudo-code, that would help me a lot.