Hello,
I really like the reference fields we can set up between data collections. This helps a LOT!
However, I am unable to filter by or sort by reference fields. My only workaround right now is to create a separate field, and manually type in the reference field data.
Is there something I’m missing about how to filter by or sort by reference fields? If not, is it possible to add this as a feature?
Do you know when sorting by reference field (either in the database/spreadsheet view, OR from the dataset, OR from the front-end side by the user) will be available?
Hi guys, to filter by a field in a collection that is connected by a reference to another collection…
I kept trying to filter using the text values displayed in the reference field; which of course came from a list populated from another collection i linked it to. But as mentioned this did not work as it does when using fields found directly in your main collection being used for the dynamic page.
Turns out that when wix connects a field via a reference to another collection, even though it does display the value using the Text Label, it actually assigns some sort of weird alphanumeric id to it. If you make a field a reference field, choose values for some items in the referenced database collection, then turn the field back into a text type, it will display this code id! It will warn you you’re breaking connections when you do, but When i used this as the value, voila, my dropdown filter worked! I just turned that field back into a reference type and i could still choose values prepopulated from my referenced dataset.
I’m getting the same issue, do you have to base a query off of the alpha numeric value generated from the referenced field, or is there any additional guidance here yet?
That worked for me. References use the ID field of the row in the parent database, instead of the field containing the string value we see on the UI. The ID field is originally hidden, so first I had to make to edit the parent database to make it visible. Then I filtered the child database by matching the reference field with the ID field of the parent. It can be accessed using the key “_id”. The code runs something like this:
Where ParentDB is the parent database (the one containing the parentfield that the child DB refers to), and childfield is the field in the child database that refers to parentfield.
hi guys, is that possible to make a input search bar for repeaters that search for the reference field when people type, instead of normal fields like “title”.
I have this data im using as reference field in my principal data. this reference field has items like “wooden” and “iron”. So if i have “tables, chairs, blocks” etc. that are made from wood, i have put the “wooden” option in the relative reference field. now i just want my searchbar to find everything made of wood by typing “wooden”. however when i set the code to search there, it gets blank results in my repeater, not showing at all. Is it possible to do?