custom 'view' based on related table active/not active column

Are you using our SaaS platform (Baserow.io) or self-hosting Baserow?

SaaS

What do you need help with?

Hi,

I would like to have a report like this easily out of baserow.
(With a view, report or dashboard).

Can you help me telling if this is possible and point me in the right direction?

Example situation:

  • table 1: Company
  • table 2: Locations

Table 2 of locations holds the following columns: name and active (checkbox)

I would like to have a view all companies with their active locations like this:

View
Organisation Location
Company A LocA,LocB
Company B LocC

Only the active ‘locations’ should be displayed. Not the inactive ones. With a default view on a table I cannot query on (sub)fields of a related table (only the main field)

Thanx in advance!

Best regards,

Roel N.

You would need to create a formula field in your company’s table to achieve this:

join(
filter(
lookup(‘Locations’, ‘Name’),
lookup(‘Locations’, ‘Active’) = true
),
‘,’
)

This will provide you the locations for each separated by a comma.

If you need this in a separate view, then you can simple hide this field in your main view and unhide it in the new view that you need to display this in.

thanx for your feedback. You pointed me in the right direction. With some search / help in this community / other requests, I came with this working / successful formula:

join(filter(totext(lookup(‘Locations’, ‘Name’)), lookup(‘Locations’, ‘Active’) = true), ‘,’)

saves you time creating this formula :slight_smile: