Think I broke my database "Unknown Error"

I can’t do anything anymore in one of my tables.

Wanted to make this formula: concat(field(‘Role’), ': ‘, if(isblank(join(field(‘People’), ‘’)), join(field(‘Origins’), ‘’), join(field(‘People’), ‘’)), if(isblank(field(‘Year’)), ‘’, concat(’: ', field(‘Year’))))

It failed and I go some unknown error, after that I can’t even delete a lookup field…

”Action not completed.

The action couldn’t be completed because an unknown error has occurred.”

I don’t know how to continue. Wanted to make a simple concat but it just never worked.

Wanted “Concat field 1, “ : “ linked field 2 or linked field 3 (whichever has any value), “ : “ field 4 if not null…

Never worked and now nothing works…. I’m on saas

Seems to be joins on link to table that don’t work. Even this break: join(field(‘People’), ', ')

And that’s correct according to documentation. :confused:

Now things work, but all joins break.

concat(
totext(field(‘Role’)),

if(
isblank(when_empty(totext(field(‘People’)), totext(field(‘Origins’)))),
‘’,
concat(’ : ', when_empty(totext(field(‘People’)), totext(field(‘Origins’))))
),

if(
isblank(totext(field(‘Year’))),
‘’,
concat(’ : ', totext(field(‘Year’)))
)
)

For example gives me nothing if either people or origins is filled, but returns only people if both are filled. This is soooo strange.

Hi @cezary,

In general, it is best to report problems as a list of steps to reproduce. So please describe all your affected tables, relevant fields (their type etc.), and specific steps taken. You can also create a minimal reproducible example and post it here as workspace export.

Thank you

I scrapped the approach completely. But got a new problem. With rollups and lookups.

Environment

  • Baserow: Saas

Schema
Tables:

  1. People/Origin (I merged these two, looks like crap, but now the previous formula works without any joins..)
  • YoD Author (Integer)
  1. Recordings
  • Roles (Link to table: Roles) — a Recording can have multiple linked Roles
  1. Roles
  • Author (Link to table: Authors) — each Role links to exactly one Author

  • YoD Author (Lookup) — looks up YoD Author via People/Origin link (type: lookup returning numbers)

  • YoPD (Formula) with:

if(
  isblank(field('YoD Author')),
  field('YoD Author'),
  add(field('YoD Author'), 71)
)

(Goal: YoPD = YoD + 71, or blank if YoD is blank.)

Test data

  • Create two authors:

    • People/Origin A: YoD Author = 1950

    • People/Origin B: YoD Author = 2000

  • Create one recording R1

  • Create two roles linked to R1:

    • Role 1 → People/Origin A

    • Role 2 → People/Origin B

Issue
In Recordings, I want the maximum public domain year across linked roles.

Attempt 1:

  • Create a Rollup field in Recordings over link Roles, target field YoPD, aggregation: Max

  • Result: error:

“Error with formula: argument number 1 given to function max was of type array but the only usable type for this argument is a list of text, or number, or char, or date, or duration values obtained from a lookup.”

Attempt 2:

  • Create YoPD lookup in Recordings (Lookup) over link Roles → field YoPD (returns list of numbers)

  • Create formula field in Recordings:

max(field('YoPD lookup'))
  • Result: same error as above.

Expected
max(...) should return 2071 for R1 (max of 1950+71=2021 and 2000+71=2071).

Actual
“Error with formula: argument number 1 given to function max was of type array but the only usable type for this argument is a list of text, or number, or char, or date, or duration values obtained from a lookup.”


Funny thing is that ChatGPT, and the “Generate using AI” suggests the very same solutions I try with…

Hey @Caesar, I managed to get the result you seemed to need by doing the following:

Is it what you’re trying to achieve?

Hi!

Do you have another version of baserow?

I only get errors when trying.”Error with formula: argument number 1 given to function tonumber was of type number but the only usable type for this argument is text, argument number 2 given to operator + was of type number but there are no possible types usable here.”

Also max within roles is not what I need, since one role has only one author and therefore only one death.It’s within recordings I need the max. And it also only regards authors which have done anything with the lyrics, which means I need to filter the Role field as well:

if(
and(
not(isblank(field(‘YoD Author’))),
or(
equal(field(‘Role’), ‘A’),
or(
equal(field(‘Role’), ‘CA’),
equal(field(‘Role’), ‘AD’)
)
)
),
add(field(‘YoD Author’), 71),
1
)

This works fine for what I try to achieve. I would not like a “1” on everything but the relevant rows, but I find no other way.

In Recordings one recording has several roles. Sometimes an original author (role code : "A”) And later an adapter/editor (role code : “AD”)

But even though these are now numbers, they’re not possible to rollup in recordings.

Does that make sense?

Or is your approach building on text fields being turned into numbers and then “maxed”, rolluped? Is the correct way to write year in text and only after make them numbers, instead of having them as numbers to start with? Does it work with lists? Like the linked lookup in recordings?

Hey @Caesar, I’m using the latest version (Baserow 2.0.6)

I guess my database structure may be different from yours.

I created a date field to store the year, and we can use a formula to convert the date to text if needed.

Did you try working with Kuma, out AI assistant to build the structure you need?

Hmm, I’ve used Kuma on empty bases, I understood it so, that if I accidentaly delete a field, there’s no way for you to recover it, therefore I don’t dare to experiment with Kuma on tables and bases that generally work very well.

But regarding the last bit. Is there some reason baserow can’t work with numbers directly when doing a rollup from a lookup?

I tried doing like you did, using a date field instead of number, and then try to convert that to number, but the formula error given to me is that “tonumber” can’t work with anything but texts, so I don’t really understan how it’s possible that you formula works and mine doesn’t when we do identical things….

I’d love to share my base if I can do it confidentially with you, so you can see the problem yourself, cuase it’s just really really strange. According to you documentation Rollup should be done with a lookup and the lookup should containt numbers. Which mine are….

And I tried Kuma AI…

Found an interesting thing, Kumo can’t read my lookup field for some API error, is that maybe the reason?

In “Recordings” I have a lookup field for the years connected to a release. They’re stored as numbers.

In JSON it looks like this:
“YoPD”: [
1,
1,
1,
2004,
2068
]

Which to me is a list or an array. Asked Kumo about it, and it told me to make a proper linked list… But it doesn’t know what that is.

I mean, the rollup want’s a lookup field with numbers. Mine is. And the rollupfunctions says it can’t work with it.

I’m out of my wits :confused:

Hey @Caesar, let’s try one more thing. Take your date field and create a new field with a formula like this:

field(date_field)

That’s it. Then try the original formula again and use this converted date field instead.

Regarding Kuma:
It would be best if you could rate the answer. If you select :-1:, you’ll see a feedback form — please share these details there so our dev team can review them.

hmmm. Yeah, that seeme to “flatten” it somehow. Strange.

So, it’s just like an extra “middle man field”. I can live with that.

Thanks for the help!

And I’ll make sure to use the report function in Kuma, didn’t know about that one. :slight_smile:

1 Like

:raising_hands:

I’ll check with the dev team on how we can improve this.

Thank you!