I’m using the fields endpoint on one of my tables to power some code generation, and I think I’ve found a bug in one of the definitions, namely this one:
{
id: 4795,
table_id: 516,
name: 'Project',
order: 6,
type: 'formula',
primary: false,
read_only: true,
date_include_time: null,
nullable: true,
number_decimal_places: null,
error: null,
date_force_timezone: null,
duration_format: null,
date_time_format: null,
array_formula_type: 'text',
date_format: null,
date_show_tzinfo: null,
formula: "lookup('Task', 'Project')",
formula_type: 'array'
}
This definition seems to imply that the returned data for that field should be of type string[]
, however it actually returns this, since Task.Project is a link row field:
{
ids: { database_table_65: 9, database_table_515: 72 },
value: 'Primary Field Text'
}
Can field definitions for formulas with lookups be updated to be more accurate, or at least to not imply a type of string[]
?
Also thinking about this, is the field definition actually accurate, and array_formula_type is referring to the type of the value within the object, making that object format a type of value wrapper that I should expect could potentially appear anywhere?
If that’s the case I might like the IDs to also include the ID of the source field, and not just the table and row IDs that I’m interpreting that object to be including.