Complex formula used to work, now unknown error (due to complexity of table / database?)

Hi,

We have created the following complex formula, which used to work when the table was less complex. There are no red error messages. However, we get an “unknown error message” now.

Can you spot what could cause the issue? It is supposed to work on a rather complex table with 800 contact row (and many fields).

Thanks for your help!

if((totext(field('Prefix'))>="Prof.") && (field('Messaging Language') = 'German') && (field('Gender') = 'm') && (field('Formality')='formal'), 
concat('Sehr geehrter Herr',' ','Professor',' ',totext(field('Last Name'))),

if((totext(field('Prefix'))>="Prof.") && (field('Messaging Language') = 'German') && (field('Gender') = 'f') && (field('Formality')='formal'), 
concat('Sehr geehrte Frau',' ','Professorin',' ',totext(field('Last Name'))),

if((totext(field('Prefix'))>="Prof.") && (field('Messaging Language') = 'German') && (field('Gender') = 'm') && (field('Formality')='informal - Sie'), 
concat('Lieber Herr',' ',totext(field('Last Name'))),

if((totext(field('Prefix'))>="Prof.") && (field('Messaging Language') = 'German') && (field('Gender') = 'f') && (field('Formality')='informal - Sie'), 
concat('Liebe Frau',' ',totext(field('Last Name'))),


if((field('Messaging Language') = 'German') && (field('Gender') = 'm') && (field('Formality')='formal'), 
concat('Sehr geehrter Herr',' ',totext(field('Prefix')),' ',totext(field('Last Name'))),

if((field('Messaging Language') = 'German') && (field('Gender') = 'f') && (field('Formality')='formal'), 
concat('Sehr geehrte Frau',' ',totext(field('Prefix')),' ',totext(field('Last Name'))),


if((field('Messaging Language') = 'German') && (field('Gender') = 'm') && (field('Formality')='informal - Sie'), 
concat('Lieber Herr',' ',totext(field('Last Name'))),

if((field('Messaging Language') = 'German') && (field('Gender') = 'f') && (field('Formality')='informal - Sie'), 
concat('Lieber Frau',' ',totext(field('Last Name'))),

if((field('Messaging Language') = 'German') && (field('Gender') = 'm') && (field('Formality')='informal - du'), 
concat('Lieber',' ',totext(field('First Name'))),

if((field('Messaging Language') = 'German') && (field('Gender') = 'f') && (field('Formality')='informal - du'), 
concat('Liebe',' ',totext(field('First Name'))),



if((totext(field('Prefix'))>="Prof.") && (field('Messaging Language') = 'English') && (field('Formality')='formal'), 
concat('Dear Professor',' ', totext(field('Last Name'))),

if((not(isblank(field('Prefix')))) && (field('Messaging Language') = 'English') && (field('Formality')='formal'), 
concat('Dear',' ','Dr',' ',totext(field('Last Name'))),

if((field('Messaging Language') = 'English') && (field('Gender') = 'm') && (field('Formality')='formal'), 
concat('Dear Mr',' ',totext(field('Last Name'))),

if((field('Messaging Language') = 'English') && (field('Gender') = 'f') && (field('Formality')='formal'), 
concat('Dear Ms',' ',totext(field('Last Name'))),

if((field('Messaging Language') = 'English') && (field('Formality')='informal - Sie'), 
concat('Dear',' ',totext(field('First Name'))),


if((field('Messaging Language') = 'English') && (field('Formality')='informal - du'), 
concat('Hello',' ',totext(field('First Name'))),
 
"CHECK GENDER AND LANGUAGE"))))))))))))))))

Are any of these Lookup fields?
If so, you might be able to save your formula by embedding them inside a “join()” function:

join(field(‘Organization’),‘’)

Explanation at the bottom of this page: Formula field reference // Baserow
from this issue:Boolean functions and fields - #2 by frederikdc

I just encountered a similar problem (except the cell was just blank, no error message), and that fixed it for me.

Thank you, @FrancoisS, for your quick reply.

None of the fields are Lookup fields.

They are all text fields except for

  • ‘Messaging Language’, which is a formula that contains a Lookup field ‘Country’)
if(field('Country') = 'Germany','German',if(field('Country') = 'Austria','German', if(field('German = Mother Tongue') = 'true','German','English')))
  • ‘Formality’, ‘Prefix’, and ‘Suffix’, which are Single select fields.

Do you think the error could be caused by the “indirect” Lookup Field?

I used join in the formula for the field ‘Messaging Langauge’.

if(join(field('Country'), '') = 'Germany','German',if(join(field('Country'), '') = 'Austria','German', if(field('German = Mother Tongue') = 'true','German','English')))

Unfortunately, I am still getting the unknown error message.

I tried totext instead of join in the formula for ‘Messaging Language’, did not solve the problem either unfortunately.

It takes about 10-15 seconds until the error message occurs, which made me believe it might be some sort of a timeout or memory issue.

I changed the formula to

if((totext(field('Prefix'))>='Prof.') && (totext(field('Messaging Language')) = 'German') && (totext(field('Gender')) = 'm') && (totext(field('Formality'))='formal'), 
concat('Sehr geehrter Herr',' ','Professor',' ',totext(field('Last Name'))),

if((totext(field('Prefix'))>='Prof.') && (totext(field('Messaging Language')) = 'German') && (totext(field('Gender')) = 'f') && (totext(field('Formality'))='formal'), 
concat('Sehr geehrte Frau',' ','Professorin',' ',totext(field('Last Name'))),

if((totext(field('Prefix'))>='Prof.') && (totext(field('Messaging Language')) = 'German') && (totext(field('Gender')) = 'm') && (totext(field('Formality'))='informal - Sie'), 
concat('Lieber Herr',' ',totext(field('Last Name'))),

if((totext(field('Prefix'))>='Prof.') && (totext(field('Messaging Language')) = 'German') && (totext(field('Gender')) = 'f') && (totext(field('Formality'))='informal - Sie'), 
concat('Liebe Frau',' ',totext(field('Last Name'))),


if((totext(field('Messaging Language')) = 'German') && (totext(field('Gender')) = 'm') && (totext(field('Formality'))='formal'), 
concat('Sehr geehrter Herr',' ',totext(field('Prefix')),' ',totext(field('Last Name'))),

if((totext(field('Messaging Language')) = 'German') && (totext(field('Gender')) = 'f') && (totext(field('Formality'))='formal'), 
concat('Sehr geehrte Frau',' ',totext(field('Prefix')),' ',totext(field('Last Name'))),


if((totext(field('Messaging Language')) = 'German') && (totext(field('Gender')) = 'm') && (totext(field('Formality'))='informal - Sie'), 
concat('Lieber Herr',' ',totext(field('Last Name'))),

if((totext(field('Messaging Language')) = 'German') && (totext(field('Gender')) = 'f') && (totext(field('Formality'))='informal - Sie'), 
concat('Lieber Frau',' ',totext(field('Last Name'))),

if((totext(field('Messaging Language')) = 'German') && (totext(field('Gender')) = 'm') && (totext(field('Formality'))='informal - du'), 
concat('Lieber',' ',totext(field('First Name'))),

if((totext(field('Messaging Language')) = 'German') && (totext(field('Gender')) = 'f') && (totext(field('Formality'))='informal - du'), 
concat('Liebe',' ',totext(field('First Name'))),



if((totext(field('Prefix'))>='Prof.') && (totext(field('Messaging Language')) = 'English') && (totext(field('Formality'))='formal'), 
concat('Dear Professor',' ', totext(field('Last Name'))),

if((not(isblank(field('Prefix')))) && (totext(field('Messaging Language')) = 'English') && (totext(field('Formality'))='formal'), 
concat('Dear',' ','Dr',' ',totext(field('Last Name'))),

if((totext(field('Messaging Language')) = 'English') && (totext(field('Gender')) = 'm') && (totext(field('Formality'))='formal'), 
concat('Dear Mr',' ',totext(field('Last Name'))),

if((totext(field('Messaging Language')) = 'English') && (totext(field('Gender')) = 'f') && (totext(field('Formality'))='formal'), 
concat('Dear Ms',' ',totext(field('Last Name'))),

if((totext(field('Messaging Language')) = 'English') && (totext(field('Formality'))='informal - Sie'), 
concat('Dear',' ',totext(field('First Name'))),


if((totext(field('Messaging Language')) = 'English') && (totext(field('Formality'))='informal - du'), 
concat('Hello',' ',totext(field('First Name'))),
 
'CHECK GENDER AND LANGUAGE'))))))))))))))))

The error message occurs after 35 seconds.