Get the first or the last element from lookup

I have a table COMMUNICATIONS that links to another table called COMPANIES. There is a column in COMMUNICATIONS called “Change of potential” (a dropdown with percentages from 10% to 100%). I want to create a column in COMPANIES called “Current potential”, which would show the most recent “Change of potential” from COMMUNICATIONS.

In Airtable this is super trivial, just check the checkbox:
Screenshot 2024-09-16 at 23.37.45

Baserow, however, does not seem to provide even a function to extract the first or the last element from the array. Or maybe it does?

Alternatively, it would be even better if there was a function to lookup a row, but return only its specific column’s value.

For example, this works fine now:
filter(field(‘Communication entries’), equal(field(‘Communication entries’), field(‘Last communication entry’)))

(given that there is a Rollup field “Last communication entry”)

It would be ideal if I could do this (pseudocode):

filter(field(‘Communication entries’), equal(field(‘Communication entries’), field(‘Last communication entry’)))[‘Change of potential’]

Thanks

For example, is it possible to extract 40% or 70% from this?
Screenshot 2024-09-16 at 23.47.45

Hey @Dae, welcome to the Baserow community :wave:

We don’t have this feature yet, but I’ll discuss it with the team as a potential new feature request.

You can use the has_option function, here’s an example:

Would it work for your case?

No, I don’t think it’s possible yet.

Thank you! I hope these feature requests will receive attention from the developers.

What I meant is some sort of a function that takes the following parameters:
— table name;
— column name;
— value to search for in the column;
— name of the column to return the value from.

Then I would be able to do create a column in COMPANIES with the following formula:

function('COMMUNICATIONS', 'Date', field('Last communication entry'), 'Change of potential')

(With “Last communication entry” being a rollup field with function MAX applied onto the COMMUNICATIONS → Date column).

Hey @Dae, I don’t think it’s possible.

We’ve also discussed the idea of adding an option to limit the number of items shown for the lookup field, and it was accepted. Once we create an issue for this feature, I’ll share it here.