So here is the thing. My function dynamically choses a datasource, and then collects the results. The collection is displayed in my gallery, and when I select an item from the gallery, the app wants to use a datasource to get the information, instead of my collection.
As i mentioned this worked until a few weeks ago. So i can't see what the problem is.
So I have various lists, lets call them A, B and C.
Based on certain inputs, a collection is made of either list A, B or C. The information is collected perfectly. Now I display the collection, 'SearchResults', in my gallery.

When I select the item, it takes me to a new page with a form having the following properties:
Item - SearchGallery1.Selected, which provides the following error:
"Invalid Formula. Expected a value compatible with 'DataSource'.
So the form wants to choose a datasource, but has to choose the collection as its source.