Hi @icos ,
I think you are confusing two things in your screenshot:
- the region name is coming from your
Region
collection, - the
region
value you highlighted in red is in an item in another collection
So it’s not any different to the issue we discussed above with the Properties and Type collections.
When working with related fields in a relational database, you have several approaches (I’ll explain with WeWeb and Supabase as an example but it’s not specific to these tools):
Option 1 - create a view in Supabase that has all the information you need, i.e. the values themselves, not the references. Then you can create a collection in WeWeb with the data from that view. The downside is you can’t use the realtime functionality of the table anymore as discussed in this topic.
Option 2 – use the advanced mode when creating a collection to get the names of reference fields in other tables. This works well but, depending on your use case, may be limiting. For example if you need to filter through the related field, as discussed in the same topic mentioned above.
Option 3 - create a collection for each table in WeWeb and use the lookup
formula to display the value from a reference field.
Option 3 is my preferred solution for your use case because:
- you already have those collections in your project
- you don’t have to load the same data twice
All three approaches are valid in terms of web development but option 3 will most likely scale better.
Does that clarify things a little bit?
No worries if not, I’ll try to record a video tutorial explaining a bit better how things work and why.