Concat linked record showing [{"id": 2, "value": "CONTENTS"}]

Linked records called such as L2 - 1 turn into [{“id”: 2, “value”: “L2 - 1”}]
I expected them to stay the same, so that L2 - 1 stays L2 - 1. Anyone any idea?

Currently I use replace functions. But it starts to add up lot of nested replace functions as I scale up the amount of records. I really hope there’s a smarter way to get around this.

Hi @360Creators ,

Unfortunately I believe you might be doing a Lookup of a Lookup which results in this and is a known bug: Lookup of Lookup fields appear as JSON and cannot be used in many functions (#1027) · Issues · Bram Wiepjes / baserow · GitLab. Currently the main workaround is to use aggregation functions in the intermediate table to convert a lookup field list of values into some single piece of text/number etc, and then look that up. This way you never end up with a nested “lookup of a lookup” and this JSON coming out.

1 Like

Thanks @nigel!

Where do I find that aggregation function in the intermediate table? I’d love to try that.

@360Creators So I meant to make intermediate formula fields which use formula functions like sum or join to take a lookup value (which is a list) and combine it all into a single value. This way you never end up with a list of lists (which causes the json bug) at the very end of your chain. A worked example would be:

We have 3 tables:

  • Locations
  • Trips
  • Years

Now say in the Years table, I want to have a formula field showing all of the Lat/Lng co-ordinates I visited in that year. Here if I used a lookup of a lookup you end up with the bug like so:

So one work around for this, is in the Trips table, I add a new formula field, which is all of the LatLngs joined into a single value. This way it won’t show up a list of values anymore, but a single value like so:

And now I lookup in the Years table this “LatLngs joined” field. And now i’m doing a lookup of a normal formula field, which doesn’t contain lists, and so I avoid the bug:

Hopefully this makes sense! Let me know if it doesn’t :slight_smile:

1 Like

Thank you very much!! :grin:
Totally got it now :grin: