I’m new to Baserow and am coming from Airtable. I just wanted to replicate a base, but something is going wrong with the Rollup Field.
I have an Ingredients table with the ingredient name, unit, and unit cost fields.
I have a Pizza Recipe table linked to the Ingredients table from which I get each ingredient for every pizza. The unit and unit cost comes through lookup fields. I also have a quantity field and, at the end, a Formula field that calculates the total cost for every recipe ingredient.
I have a Pizza Table linked to the Pizza Recipe Table, and here, I want to display the total cost of every pizza through a rollup field.
The error is the following:
Error with formula: argument number 1 given to function sum was of type array but the only usable type for this argument is a list of number, or duration values obtained from a lookup.
Can anyone help me, please? I don’t understand what is happening. In Airtable precisely the same flow does function very well.
The reason you get the error is because linked fields and lookup fields in Baserow are always considered to be lists, even if they only contain one item. I tried to replicate your database structure.
A table with Ingredients that have a field for the unit cost
A table with Recipes. Each record in that table has an ingredient. There is only one ingredient for a record. So, I use the rollup function min() or max() to make sure that value is a number and not a list of items. You will notice that the grey background disappears and that the number is aligned to the right side of the field. This indicates that it is a number instead of a list of items