Formula results in 500 server error; no errors in UI

How might I solve this problem with my formula?

Help Questionnaire

Self-Hosted Installation and Setup Questions

How have you self-hosted Baserow.

Via Render.com

What are the specs of the service or server you are using to host Baserow.

Render.com Standard plan–2 GB ram, 1 vCPU.

Which version of Baserow are you using.

Version 1.22.3

How have you configured your self-hosted installation?

Render.com blueprint, with some details obscured:

services:
  - type: web
    name: baserow
    runtime: image
    plan: standard
    domains:
      - baserow.example.com
    image:
      url: docker.io/baserow/baserow:latest
    envVars:
      - key: BASEROW_PUBLIC_URL
        value: https://baserow.example.com
      - key: DATABASE_HOST
        fromDatabase:
          name: database_name
          property: host
      - key: DATABASE_NAME
        fromDatabase:
          name: database_name
          property: database
      - key: DATABASE_USER
        fromDatabase:
          name: database_name
          property: user
      - key: DATABASE_PASSWORD
        fromDatabase:
          name: database_name
          property: password
      - key: DATABASE_PORT
        fromDatabase:
          name: database_name
          property: port
    disk:
      name: baserow
      mountPath: /baserow/data
      sizeGB: 3

databases:
  - name: database_name
    databaseName: database_name

What commands if any did you use to start your Baserow server?

None, so I expect it’s using the default Docker entrypoint from the image.

Describe the problem

Describe, step by step, how to reproduce the error or problem you are encountering.

This formula fails silently, with a 500 server error visible in the browser console, when I try to add it to my Users table:

filter(
	field('Rates'), 
	and(
		isblank(
			lookup('Rates','Clients')
		),
		isblank(
			lookup('Rates','Projects')
		)
	)
)

The error seems to occur the same whether I provide the formula in a single line, or formatted as above.

Here’s the error log from the browser console:

POST https://baserow.example.com/api/database/fields/table/517/ 500 (Internal Server Error)
(anonymous) @ bf9bda3.js:2
xhr @ bf9bda3.js:2
tt @ bf9bda3.js:2
Promise.then (async)
value @ bf9bda3.js:2
(anonymous) @ bf9bda3.js:2
(anonymous) @ bf9bda3.js:2
create @ 3b9ce64.js:1
(anonymous) @ 3b9ce64.js:1
y @ bf9bda3.js:2
(anonymous) @ bf9bda3.js:2
(anonymous) @ bf9bda3.js:2
r @ bf9bda3.js:2
l @ bf9bda3.js:2
(anonymous) @ bf9bda3.js:2
(anonymous) @ bf9bda3.js:2
create @ 3b9ce64.js:1
(anonymous) @ bf9bda3.js:2
m.dispatch @ bf9bda3.js:2
dispatch @ bf9bda3.js:2
(anonymous) @ 3b9ce64.js:1
y @ bf9bda3.js:2
(anonymous) @ bf9bda3.js:2
(anonymous) @ bf9bda3.js:2
r @ bf9bda3.js:2
l @ bf9bda3.js:2
(anonymous) @ bf9bda3.js:2
(anonymous) @ bf9bda3.js:2
submit @ 3b9ce64.js:1
$n @ bf9bda3.js:2
n @ bf9bda3.js:2
$n @ bf9bda3.js:2
t.$emit @ bf9bda3.js:2
submit @ 3b9ce64.js:1
submit @ 3b9ce64.js:1
$n @ bf9bda3.js:2
n @ bf9bda3.js:2
Si.c._wrapper @ bf9bda3.js:2

Looking at the network tab, here are the details of the request that failed:

Payload:

{
    "name": "Formula",
    "formula": "filter(\n\tfield('Rates'), \n\tand(\n\t\tisblank(\n\t\t\tlookup('Rates','Clients')\n\t\t),\n\t\tisblank(\n\t\t\tlookup('Rates','Projects')\n\t\t)\n\t)\n)",
    "type": "formula"
}

Response:

<!doctype html>
<html lang="en">
<head>
  <title>Server Error (500)</title>
</head>
<body>
  <h1>Server Error (500)</h1><p></p>
</body>
</html>

Provide screenshots or include share links showing:

I’d rather not share links or screenshots, so here are the table schemas according to the API:

Clients
[
    {
        "id": 4750,
        "table_id": 514,
        "name": "Name",
        "order": 0,
        "type": "text",
        "primary": true,
        "read_only": false,
        "text_default": ""
    },
    {
        "id": 4751,
        "table_id": 514,
        "name": "Notes",
        "order": 1,
        "type": "long_text",
        "primary": false,
        "read_only": false
    },
    {
        "id": 4757,
        "table_id": 514,
        "name": "Projects",
        "order": 3,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 65,
        "link_row_related_field_id": 4756,
        "link_row_table": 65,
        "link_row_related_field": 4756
    },
    {
        "id": 4789,
        "table_id": 514,
        "name": "Lead",
        "order": 4,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 517,
        "link_row_related_field_id": 4790,
        "link_row_table": 517,
        "link_row_related_field": 4790
    },
    {
        "id": 4805,
        "table_id": 514,
        "name": "Rates",
        "order": 5,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 518,
        "link_row_related_field_id": 4804,
        "link_row_table": 518,
        "link_row_related_field": 4804
    }
]
Projects
[
    {
        "id": 677,
        "table_id": 65,
        "name": "Name",
        "order": 0,
        "type": "text",
        "primary": true,
        "read_only": false,
        "text_default": ""
    },
    {
        "id": 4756,
        "table_id": 65,
        "name": "Client",
        "order": 3,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 514,
        "link_row_related_field_id": 4757,
        "link_row_table": 514,
        "link_row_related_field": 4757
    },
    {
        "id": 4759,
        "table_id": 65,
        "name": "Tasks",
        "order": 4,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 515,
        "link_row_related_field_id": 4758,
        "link_row_table": 515,
        "link_row_related_field": 4758
    },
    {
        "id": 4778,
        "table_id": 65,
        "name": "Estimated",
        "order": 5,
        "type": "rollup",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": 2,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": false,
        "array_formula_type": null,
        "through_field_id": 4759,
        "target_field_id": 4783,
        "rollup_function": "sum",
        "formula_type": "number"
    },
    {
        "id": 4779,
        "table_id": 65,
        "name": "Used",
        "order": 6,
        "type": "rollup",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": 0,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": false,
        "array_formula_type": null,
        "through_field_id": 4759,
        "target_field_id": 4771,
        "rollup_function": "sum",
        "formula_type": "number"
    },
    {
        "id": 4780,
        "table_id": 65,
        "name": "Status",
        "order": 7,
        "type": "single_select",
        "primary": false,
        "read_only": false,
        "select_options": [
            {
                "id": 2510,
                "value": "Proposal",
                "color": "gray"
            },
            {
                "id": 2512,
                "value": "Execution",
                "color": "dark-red"
            }
        ]
    },
    {
        "id": 4784,
        "table_id": 65,
        "name": "Client Rate",
        "order": 8,
        "type": "number",
        "primary": false,
        "read_only": false,
        "number_decimal_places": 0,
        "number_negative": false
    },
    {
        "id": 4785,
        "table_id": 65,
        "name": "Raw Price",
        "order": 9,
        "type": "formula",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": 2,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": false,
        "array_formula_type": null,
        "formula": "field('Estimated')*field('Client Rate')",
        "formula_type": "number"
    },
    {
        "id": 4786,
        "table_id": 65,
        "name": "Final Price",
        "order": 10,
        "type": "number",
        "primary": false,
        "read_only": false,
        "number_decimal_places": 2,
        "number_negative": false
    },
    {
        "id": 4787,
        "table_id": 65,
        "name": "Luke's Rate",
        "order": 11,
        "type": "number",
        "primary": false,
        "read_only": false,
        "number_decimal_places": 2,
        "number_negative": false
    },
    {
        "id": 4788,
        "table_id": 65,
        "name": "Notes",
        "order": 12,
        "type": "long_text",
        "primary": false,
        "read_only": false
    },
    {
        "id": 4803,
        "table_id": 65,
        "name": "Rates",
        "order": 13,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 518,
        "link_row_related_field_id": 4802,
        "link_row_table": 518,
        "link_row_related_field": 4802
    },
    {
        "id": 4809,
        "table_id": 65,
        "name": "Client Rates",
        "order": 14,
        "type": "lookup",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": null,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": true,
        "array_formula_type": "text",
        "through_field_id": 4756,
        "through_field_name": "Client",
        "target_field_id": 4805,
        "target_field_name": "Rates",
        "formula_type": "array"
    }
]
Tasks
[
    {
        "id": 4753,
        "table_id": 515,
        "name": "Name",
        "order": 0,
        "type": "text",
        "primary": true,
        "read_only": false,
        "text_default": ""
    },
    {
        "id": 4754,
        "table_id": 515,
        "name": "Notes",
        "order": 1,
        "type": "long_text",
        "primary": false,
        "read_only": false
    },
    {
        "id": 4758,
        "table_id": 515,
        "name": "Project",
        "order": 3,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 65,
        "link_row_related_field_id": 4759,
        "link_row_table": 65,
        "link_row_related_field": 4759
    },
    {
        "id": 4760,
        "table_id": 515,
        "name": "Nathan Estimate",
        "order": 4,
        "type": "number",
        "primary": false,
        "read_only": false,
        "number_decimal_places": 2,
        "number_negative": false
    },
    {
        "id": 4761,
        "table_id": 515,
        "name": "Status",
        "order": 5,
        "type": "single_select",
        "primary": false,
        "read_only": false,
        "select_options": [
            {
                "id": 2507,
                "value": "Pending",
                "color": "dark-brown"
            },
            {
                "id": 2508,
                "value": "Complete",
                "color": "green"
            },
            {
                "id": 2509,
                "value": "Never",
                "color": "dark-gray"
            },
            {
                "id": 2511,
                "value": "In Progress",
                "color": "dark-pink"
            }
        ]
    },
    {
        "id": 4770,
        "table_id": 515,
        "name": "Entries",
        "order": 6,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 516,
        "link_row_related_field_id": 4769,
        "link_row_table": 516,
        "link_row_related_field": 4769
    },
    {
        "id": 4771,
        "table_id": 515,
        "name": "Used",
        "order": 7,
        "type": "formula",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": 2,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": false,
        "array_formula_type": null,
        "formula": "field('Average')*field('Count')",
        "formula_type": "number"
    },
    {
        "id": 4777,
        "table_id": 515,
        "name": "Multiplier",
        "order": 8,
        "type": "formula",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": 2,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": false,
        "array_formula_type": null,
        "formula": "field('Used')/field('Nathan Estimate')",
        "formula_type": "number"
    },
    {
        "id": 4782,
        "table_id": 515,
        "name": "Luke Estimate",
        "order": 9,
        "type": "number",
        "primary": false,
        "read_only": false,
        "number_decimal_places": 2,
        "number_negative": false
    },
    {
        "id": 4783,
        "table_id": 515,
        "name": "Estimate",
        "order": 10,
        "type": "formula",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": 2,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": true,
        "array_formula_type": null,
        "formula": "if(or(isblank(field('Nathan Estimate')),isblank(field('Luke Estimate'))),greatest(field('Nathan Estimate'),field('Luke Estimate')),(field('Nathan Estimate')+field('Luke Estimate'))/2)",
        "formula_type": "number"
    },
    {
        "id": 4791,
        "table_id": 515,
        "name": "Client",
        "order": 11,
        "type": "formula",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": null,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": true,
        "array_formula_type": "text",
        "formula": "lookup('Project','Client')",
        "formula_type": "array"
    },
    {
        "id": 4793,
        "table_id": 515,
        "name": "Average",
        "order": 12,
        "type": "rollup",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": 1,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": false,
        "array_formula_type": null,
        "through_field_id": 4770,
        "target_field_id": 4768,
        "rollup_function": "avg",
        "formula_type": "number"
    },
    {
        "id": 4794,
        "table_id": 515,
        "name": "Count",
        "order": 13,
        "type": "rollup",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": 0,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": false,
        "array_formula_type": null,
        "through_field_id": 4770,
        "target_field_id": 4768,
        "rollup_function": "count",
        "formula_type": "number"
    },
    {
        "id": 4810,
        "table_id": 515,
        "name": "Project Rates",
        "order": 14,
        "type": "lookup",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": null,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": true,
        "array_formula_type": "text",
        "through_field_id": 4758,
        "through_field_name": "Project",
        "target_field_id": 4803,
        "target_field_name": "Rates",
        "formula_type": "array"
    },
    {
        "id": 4811,
        "table_id": 515,
        "name": "Client Rates",
        "order": 15,
        "type": "lookup",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": null,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": true,
        "array_formula_type": "text",
        "through_field_id": 4758,
        "through_field_name": "Project",
        "target_field_id": 4809,
        "target_field_name": "Client Rates",
        "formula_type": "array"
    }
]
Users
[
    {
        "id": 4772,
        "table_id": 517,
        "name": "Name",
        "order": 0,
        "type": "text",
        "primary": true,
        "read_only": false,
        "text_default": ""
    },
    {
        "id": 4776,
        "table_id": 517,
        "name": "Entries",
        "order": 3,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 516,
        "link_row_related_field_id": 4775,
        "link_row_table": 516,
        "link_row_related_field": 4775
    },
    {
        "id": 4790,
        "table_id": 517,
        "name": "Clients",
        "order": 4,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 514,
        "link_row_related_field_id": 4789,
        "link_row_table": 514,
        "link_row_related_field": 4789
    },
    {
        "id": 4801,
        "table_id": 517,
        "name": "Rates",
        "order": 5,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 518,
        "link_row_related_field_id": 4800,
        "link_row_table": 518,
        "link_row_related_field": 4800
    }
]
Entries
[
    {
        "id": 4762,
        "table_id": 516,
        "name": "UUID",
        "order": 0,
        "type": "uuid",
        "primary": true,
        "read_only": true
    },
    {
        "id": 4766,
        "table_id": 516,
        "name": "Start",
        "order": 1,
        "type": "date",
        "primary": false,
        "read_only": false,
        "date_format": "ISO",
        "date_include_time": true,
        "date_time_format": "24",
        "date_show_tzinfo": true,
        "date_force_timezone": null
    },
    {
        "id": 4767,
        "table_id": 516,
        "name": "End",
        "order": 2,
        "type": "date",
        "primary": false,
        "read_only": false,
        "date_format": "ISO",
        "date_include_time": true,
        "date_time_format": "24",
        "date_show_tzinfo": true,
        "date_force_timezone": null
    },
    {
        "id": 4768,
        "table_id": 516,
        "name": "Hours",
        "order": 3,
        "type": "formula",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": 1,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": false,
        "array_formula_type": null,
        "formula": "date_diff(\"second\", field('Start'), field('End'))/3600",
        "formula_type": "number"
    },
    {
        "id": 4769,
        "table_id": 516,
        "name": "Task",
        "order": 4,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 515,
        "link_row_related_field_id": 4770,
        "link_row_table": 515,
        "link_row_related_field": 4770
    },
    {
        "id": 4775,
        "table_id": 516,
        "name": "User",
        "order": 5,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 517,
        "link_row_related_field_id": 4776,
        "link_row_table": 517,
        "link_row_related_field": 4776
    },
    {
        "id": 4795,
        "table_id": 516,
        "name": "Project",
        "order": 6,
        "type": "formula",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": null,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": true,
        "array_formula_type": "text",
        "formula": "lookup('Task', 'Project')",
        "formula_type": "array"
    },
    {
        "id": 4796,
        "table_id": 516,
        "name": "Client",
        "order": 7,
        "type": "formula",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": null,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": true,
        "array_formula_type": "text",
        "formula": "lookup('Task','Client')",
        "formula_type": "array"
    },
    {
        "id": 4808,
        "table_id": 516,
        "name": "User Rates",
        "order": 8,
        "type": "lookup",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": null,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": true,
        "array_formula_type": "text",
        "through_field_id": 4775,
        "through_field_name": "User",
        "target_field_id": 4801,
        "target_field_name": "Rates",
        "formula_type": "array"
    },
    {
        "id": 4812,
        "table_id": 516,
        "name": "Project Rates",
        "order": 9,
        "type": "lookup",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": null,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": true,
        "array_formula_type": "text",
        "through_field_id": 4769,
        "through_field_name": "Task",
        "target_field_id": 4810,
        "target_field_name": "Project Rates",
        "formula_type": "array"
    },
    {
        "id": 4813,
        "table_id": 516,
        "name": "Client Rates",
        "order": 10,
        "type": "lookup",
        "primary": false,
        "read_only": true,
        "duration_format": null,
        "date_force_timezone": null,
        "number_decimal_places": null,
        "date_time_format": null,
        "error": null,
        "date_show_tzinfo": null,
        "date_format": null,
        "date_include_time": null,
        "nullable": true,
        "array_formula_type": "text",
        "through_field_id": 4769,
        "through_field_name": "Task",
        "target_field_id": 4811,
        "target_field_name": "Client Rates",
        "formula_type": "array"
    }
]
Rates
[
    {
        "id": 4797,
        "table_id": 518,
        "name": "ID",
        "order": 0,
        "type": "uuid",
        "primary": true,
        "read_only": true
    },
    {
        "id": 4800,
        "table_id": 518,
        "name": "User",
        "order": 1,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 517,
        "link_row_related_field_id": 4801,
        "link_row_table": 517,
        "link_row_related_field": 4801
    },
    {
        "id": 4802,
        "table_id": 518,
        "name": "Projects",
        "order": 2,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 65,
        "link_row_related_field_id": 4803,
        "link_row_table": 65,
        "link_row_related_field": 4803
    },
    {
        "id": 4804,
        "table_id": 518,
        "name": "Clients",
        "order": 3,
        "type": "link_row",
        "primary": false,
        "read_only": false,
        "link_row_table_id": 514,
        "link_row_related_field_id": 4805,
        "link_row_table": 514,
        "link_row_related_field": 4805
    },
    {
        "id": 4806,
        "table_id": 518,
        "name": "Rate",
        "order": 4,
        "type": "number",
        "primary": false,
        "read_only": false,
        "number_decimal_places": 2,
        "number_negative": false
    },
    {
        "id": 4807,
        "table_id": 518,
        "name": "Cost",
        "order": 5,
        "type": "number",
        "primary": false,
        "read_only": false,
        "number_decimal_places": 2,
        "number_negative": false
    }
]

How many rows in total do you have in your Baserow tables?

Currently no table has more than 150 rows.

Please attach full logs from all of Baserow’s services

These are the relevant logs I see in my Render.com dashboard.

https://gist.github.com/narthur/3f2b03371201c99e5ac240365d1bfc27

Hi @narthur,

thanks for the accurate report. I can confirm this is a bug with the UUID field and formulas with lookups.
I’ve created a ticket to fix it here: Bug with formula and UUIDs as primary field (#2354) · Issues · Baserow / baserow · GitLab

From my tests, this bug doesn’t affect the Autonumber field. Would it be possible to use the Autonumber instead of the UUID as the primary field in your case?

1 Like

Thank you for the follow-up! We’ve worked around it on our end, but good to know you were able to replicate the issue.