Formulas problem

Hi, baserowers!

I’m trying to integrate baserow in my company, but now i’m stuck with formulas.

Let’s say I have a lookup field (with possible empty), that should give me a number, and bool field. What I need is to add one field to another. There is no problem with bool field - I’ve casted it to number with ‘if’, but the problem in lookup field, as it returns an array(?). How can I translate that array to number?

Hello @headshaker, first of all, welcome to the Baserow community :wave:

@nigel could you please check out this request?


Generally when writing formulas, if you are referencing a lookup field, a link row field, or using the lookup function you will always get back a list or array of values. To get this list down to a single value, like a single number, you need to use one of the aggregation functions like sum.

There is a separate bug, where if you lookup a lookup field itself, you end up seeing a pile of JSON and you are not able to use aggregate functions on the lookup of a lookup. Please see this thread where I go into a workaround that can help in this situation until we fix this bug: Concat linked record showing [{"id": 2, "value": "CONTENTS"}]

If you have further questions, could you provide screenshots showing your exact table structure, and all of your formulas/lookups/link row fields?

1 Like

Thanks for detailed reply, worked great!

1 Like